Skip to content

Commit

Permalink
Merge pull request LaravelCollective#676 from open-source-contributio…
Browse files Browse the repository at this point in the history
…ns/improve_phpunit_fixtures

Improve PHPUnit fixtures
  • Loading branch information
mlantz authored Dec 15, 2020
2 parents af6e88d + 74384b0 commit db28e1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/FormAccessibleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class FormAccessibleTest extends PHPUnit\Framework\TestCase
{
public function setUp()
protected function setUp(): void
{
Capsule::table('models')->truncate();
Model::unguard();
Expand Down
4 changes: 2 additions & 2 deletions tests/FormBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FormBuilderTest 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);
Expand All @@ -46,7 +46,7 @@ public function setUp()
/**
* Destroy the test environment.
*/
public function tearDown()
protected function tearDown(): void
{
m::close();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/HtmlBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit db28e1a

Please sign in to comment.