From fa9a476957b2a090824754cad9d113c076cb8bda Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 4 Sep 2020 08:08:09 +1000 Subject: [PATCH] Update unit tests to match content --- tests/phpunit/CRM/Core/ResourcesTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Core/ResourcesTest.php b/tests/phpunit/CRM/Core/ResourcesTest.php index 2d726ab811..93596d0c0f 100644 --- a/tests/phpunit/CRM/Core/ResourcesTest.php +++ b/tests/phpunit/CRM/Core/ResourcesTest.php @@ -196,7 +196,7 @@ class CRM_Core_ResourcesTest extends CiviUnitTestCase { $this->res->getSettings('html-header') ); $actual = CRM_Core_Region::instance('html-header')->render(''); - $expected = 'var CRM = ' . json_encode(['fruit' => ['yours' => 'orange', 'mine' => 'apple']]) . ';'; + $expected = '})(' . json_encode(['fruit' => ['yours' => 'orange', 'mine' => 'apple']]) . ')'; $this->assertTrue(strpos($actual, $expected) !== FALSE); } @@ -209,7 +209,7 @@ class CRM_Core_ResourcesTest extends CiviUnitTestCase { $this->res->getSettings('billing-block') ); $actual = CRM_Core_Region::instance('billing-block')->render(''); - $expected = 'CRM.$.extend(true, CRM, ' . json_encode(['cheese' => ['edam' => 'red', 'cheddar' => 'yellow']]) . ');'; + $expected = '})(' . json_encode(['cheese' => ['edam' => 'red', 'cheddar' => 'yellow']]) . ')'; $this->assertTrue(strpos($actual, $expected) !== FALSE); } -- 2.25.1