X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FCRM%2FContact%2FSelectorTest.php;h=2841d6f1f4510b33284b2e53c3d4abecae039606;hb=1ec58feb156bc3bb806fe3b38dd9ee122ec3c89b;hp=699a7b030187d4ccc17e065bec45875b34d5c7b9;hpb=9a2d15b9c696b14b4e53a782099949be77359716;p=civicrm-core.git diff --git a/tests/phpunit/CRM/Contact/SelectorTest.php b/tests/phpunit/CRM/Contact/SelectorTest.php index 699a7b0301..2841d6f1f4 100644 --- a/tests/phpunit/CRM/Contact/SelectorTest.php +++ b/tests/phpunit/CRM/Contact/SelectorTest.php @@ -66,7 +66,7 @@ class CRM_Contact_SelectorTest extends CiviUnitTestCase { $this->assertLike($this->strWrangle($queryString), $this->strWrangle($sql[$index])); } if (!empty($dataSet['where_contains'])) { - $this->assertContains($this->strWrangle(str_replace('@tagid', $tag['id'], $dataSet['where_contains'])), $this->strWrangle($sql[2])); + $this->assertStringContainsString($this->strWrangle(str_replace('@tagid', $tag['id'], $dataSet['where_contains'])), $this->strWrangle($sql[2])); } // Ensure that search builder return individual contact as per criteria if ($dataSet['context'] === 'builder') { @@ -175,7 +175,7 @@ class CRM_Contact_SelectorTest extends CiviUnitTestCase { //Check if email column contains (On Hold) string. foreach ($rows[$contactID] as $key => $value) { if (strpos($key, 'email') !== FALSE) { - $this->assertContains("(On Hold)", (string) $value); + $this->assertStringContainsString("(On Hold)", (string) $value); } } } @@ -664,7 +664,7 @@ AND ( 1 ) AND (contact_a.is_deleted = 0)', FALSE, FALSE ); //Check if custom table is included in $query->_tables. - $this->assertTrue(in_array($cgTableName, array_keys($query->_tables))); + $this->assertTrue(array_key_exists($cgTableName, $query->_tables)); //Assert if from clause joins the custom table. $this->assertTrue(strpos($query->_fromClause, $cgTableName) !== FALSE); $this->callAPISuccess('CustomField', 'delete', ['id' => $customField['id']]);