Skip to content

Commit db28e1a

Browse files
authored
Merge pull request LaravelCollective#676 from open-source-contributions/improve_phpunit_fixtures
Improve PHPUnit fixtures
2 parents af6e88d + 74384b0 commit db28e1a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/FormAccessibleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class FormAccessibleTest extends PHPUnit\Framework\TestCase
1616
{
17-
public function setUp()
17+
protected function setUp(): void
1818
{
1919
Capsule::table('models')->truncate();
2020
Model::unguard();

tests/FormBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class FormBuilderTest extends PHPUnit\Framework\TestCase
2222
/**
2323
* Setup the test environment.
2424
*/
25-
public function setUp()
25+
protected function setUp(): void
2626
{
2727
$this->urlGenerator = new UrlGenerator(new RouteCollection(), Request::create('/foo', 'GET'));
2828
$this->viewFactory = m::mock(Factory::class);
@@ -46,7 +46,7 @@ public function setUp()
4646
/**
4747
* Destroy the test environment.
4848
*/
49-
public function tearDown()
49+
protected function tearDown(): void
5050
{
5151
m::close();
5252
}

tests/HtmlBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class HtmlBuilderTest extends PHPUnit\Framework\TestCase
1313
/**
1414
* Setup the test environment.
1515
*/
16-
public function setUp()
16+
protected function setUp(): void
1717
{
1818
$this->urlGenerator = new UrlGenerator(new RouteCollection(), Request::create('/foo', 'GET'));
1919
$this->viewFactory = m::mock(Factory::class);
2020
$this->htmlBuilder = new HtmlBuilder($this->urlGenerator, $this->viewFactory);
2121
}
2222

23-
public function tearDown()
23+
protected function tearDown(): void
2424
{
2525
m::close();
2626
}

0 commit comments

Comments
 (0)