Problem/Motivation

Fox example:

-    $this->assertFalse(in_array('t3', $cids), "Existing key 3 has been removed from &\$cids");
-    $this->assertTrue(in_array('t4', $cids), "Non existing key 4 is still in &\$cids");
+    $this->assertNotContains('t3', $cids);
+    $this->assertContains('t4', $cids);

Proposed resolution

Replace with https://phpunit.readthedocs.io/ru/latest/assertions.html#assertcontains

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

gena.io created an issue. See original summary.

gena.io’s picture

gena.io’s picture

Status: Active » Needs review
andypost’s picture

Status: Needs review » Needs work
+++ b/tests/src/Functional/MasqueradeCacheTest.php
@@ -99,10 +99,10 @@ class MasqueradeCacheTest extends MasqueradeWebTestBase {
+    $this->assertContains('session.is_masquerading', $block->getPlugin()->getCacheContexts(), TRUE);

this is wrong, 3rd argument is $message and 4th one is deprecated $ignoreCase

  • andypost committed 1f118d7 on 8.x-2.x authored by gena.io
    Issue #3153834 by gena.io, andypost: Replace assertions involving calls...
andypost’s picture

Assigned: gena.io » Unassigned
Status: Needs work » Fixed
StatusFileSize
new842 bytes
new950 bytes

Thanks! Fixed on commit

andypost’s picture

Issue summary: View changes

Updated IS

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.