This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,7 @@ class HeadScriptTest extends \PHPUnit_Framework_TestCase
40
40
public function setUp ()
41
41
{
42
42
$ this ->basePath = __DIR__ . '/_files/modules ' ;
43
- $ this ->view = new \Zend \View \Renderer \PhpRenderer ();
44
43
$ this ->helper = new Helper \HeadScript ();
45
- $ this ->helper ->setView ($ this ->view );
46
44
}
47
45
48
46
/**
@@ -480,11 +478,12 @@ public function testSupportsCrossOriginAttribute()
480
478
481
479
public function testOmitsTypeAttributeIfEmptyValue ()
482
480
{
483
- $ doctype = $ this ->view ->plugin ('doctype ' )->getDoctype ();
484
- $ this ->view ->plugin ('doctype ' )->setDoctype (\Zend \View \Helper \Doctype::HTML5 );
481
+ $ view = new \Zend \View \Renderer \PhpRenderer ();
482
+ $ view ->plugin ('doctype ' )->setDoctype (\Zend \View \Helper \Doctype::HTML5 );
483
+ $ this ->helper ->setView ($ view );
484
+
485
485
$ this ->helper ->__invoke ()->appendScript ('// some script ' . PHP_EOL , '' );
486
486
$ test = $ this ->helper ->__invoke ()->toString ();
487
487
$ this ->assertNotContains ('type ' , $ test );
488
- $ this ->view ->plugin ('doctype ' )->setDoctype ($ doctype );
489
488
}
490
489
}
You can’t perform that action at this time.
0 commit comments