Update unit tests to match content
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 3 Sep 2020 22:08:09 +0000 (08:08 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 3 Sep 2020 22:08:09 +0000 (08:08 +1000)
tests/phpunit/CRM/Core/ResourcesTest.php

index 2d726ab811c64d649e61500d5200eccdf72e3d12..93596d0c0fdc04831674ddead3e9dcc81738d5d4 100644 (file)
@@ -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);
   }