Skip to content

Commit

Permalink
Update unit tests to match content
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Sep 3, 2020
1 parent e564eac commit fa9a476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/phpunit/CRM/Core/ResourcesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function testAddSetting() {
$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);
}

Expand All @@ -209,7 +209,7 @@ public function testAddSettingToBillingBlock() {
$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);
}

Expand Down

0 comments on commit fa9a476

Please sign in to comment.