From 242d78de3de1eeb2bbef15a3bee75f1e61377874 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 22 May 2021 12:44:06 +1000 Subject: [PATCH] Further fixes --- tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php | 2 +- .../Contact/Page/View/UserDashboard/GroupContactTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php b/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php index 692a2ad43d..41cdc5ea91 100644 --- a/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php +++ b/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php @@ -449,7 +449,7 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase { ); $key = $query->getGroupCacheTableKeys()[0]; $expectedWhere = "civicrm_group_contact_cache_{$key}.group_id IN (\"{$group->id}\", \"{$group2->id}\")"; - $this->assertContains($expectedWhere, $query->_whereClause); + $this->assertStringContainsString($expectedWhere, $query->_whereClause); $this->_assertContactIds($query, "group_id IN ({$group->id}, {$group2->id})"); $params = [['group', 'NOT IN', [$group->id], 1, 0]]; diff --git a/tests/phpunit/CRM/Contact/Page/View/UserDashboard/GroupContactTest.php b/tests/phpunit/CRM/Contact/Page/View/UserDashboard/GroupContactTest.php index f198381b4e..2a0936eed1 100644 --- a/tests/phpunit/CRM/Contact/Page/View/UserDashboard/GroupContactTest.php +++ b/tests/phpunit/CRM/Contact/Page/View/UserDashboard/GroupContactTest.php @@ -182,10 +182,10 @@ class CRM_Contact_Page_View_UserDashboard_GroupContactTest extends CiviUnitTestC $form = CRM_Core_Smarty::singleton()->get_template_vars('form'); $group_id_field_html = $form['group_id']['html']; - $this->assertNotContains('* ' . $publicSmartGroupTitle, $group_id_field_html, "Group '$publicSmartGroupTitle' should not be in listed available groups, but is."); - $this->assertNotContains($publicStdGroupTitle, $group_id_field_html, "Group '$publicStdGroupTitle' should not be in listed available groups, but is."); - $this->assertNotContains('* ' . $adminSmartGroupTitle, $group_id_field_html, "Group '$adminSmartGroupTitle' should not be in listed available groups, but is."); - $this->assertNotContains($adminStdGroupTitle, $group_id_field_html, "Group '$adminStdGroupTitle' should not be in listed available groups, but is."); + $this->assertStringNotContainsString('* ' . $publicSmartGroupTitle, $group_id_field_html, "Group '$publicSmartGroupTitle' should not be in listed available groups, but is."); + $this->assertStringNotContainsString($publicStdGroupTitle, $group_id_field_html, "Group '$publicStdGroupTitle' should not be in listed available groups, but is."); + $this->assertStringNotContainsString('* ' . $adminSmartGroupTitle, $group_id_field_html, "Group '$adminSmartGroupTitle' should not be in listed available groups, but is."); + $this->assertStringNotContainsString($adminStdGroupTitle, $group_id_field_html, "Group '$adminStdGroupTitle' should not be in listed available groups, but is."); } } -- 2.25.1