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

Commit f4af03e

Browse files
committed
set view for test only
1 parent 8d5ba12 commit f4af03e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/Helper/HeadScriptTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ class HeadScriptTest extends \PHPUnit_Framework_TestCase
4040
public function setUp()
4141
{
4242
$this->basePath = __DIR__ . '/_files/modules';
43-
$this->view = new \Zend\View\Renderer\PhpRenderer();
4443
$this->helper = new Helper\HeadScript();
45-
$this->helper->setView($this->view);
4644
}
4745

4846
/**
@@ -480,11 +478,12 @@ public function testSupportsCrossOriginAttribute()
480478

481479
public function testOmitsTypeAttributeIfEmptyValue()
482480
{
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+
485485
$this->helper->__invoke()->appendScript('// some script' . PHP_EOL, '');
486486
$test = $this->helper->__invoke()->toString();
487487
$this->assertNotContains('type', $test);
488-
$this->view->plugin('doctype')->setDoctype($doctype);
489488
}
490489
}

0 commit comments

Comments
 (0)