Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 9a1b69d

Browse files
committed
fix testNoEscapeDefaultsToFalse
the test expects that there is no view available
1 parent 9dbade0 commit 9a1b69d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Helper/HeadScriptTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,16 @@ public function testNoEscapeWithAllowArbitraryAttributesDoesNotIncludeNoEscapeSc
445445

446446
public function testNoEscapeDefaultsToFalse()
447447
{
448+
// it only defaults to false if there is no view, respectively no doctype helper available
449+
$oldview = $this->view;
450+
$this->view = null;
448451
$this->helper->__invoke()->appendScript('// some script' . PHP_EOL, 'text/javascript', []);
449452
$test = $this->helper->__invoke()->toString();
450453

451454
$this->assertContains('//<!--', $test);
452455
$this->assertContains('//-->', $test);
456+
457+
$this->view = $oldview;
453458
}
454459

455460
public function testNoEscapeTrue()

0 commit comments

Comments
 (0)