Improve PHPUnit fixtures

This commit is contained in:
peter279k committed 2020-12-12 02:51:17 +08:00
1 parent f337e4f605
commit 74384b08d9
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -13,14 +13,14 @@ class HtmlBuilderTest extends PHPUnit\Framework\TestCase
/**
* Setup the test environment.
*/
public function setUp()
protected function setUp(): void
{
$this->urlGenerator = new UrlGenerator(new RouteCollection(), Request::create('/foo', 'GET'));
$this->viewFactory = m::mock(Factory::class);
$this->htmlBuilder = new HtmlBuilder($this->urlGenerator, $this->viewFactory);
}
public function tearDown()
protected function tearDown(): void
{
m::close();
}