Merge pull request #676 from open-source-contributions/improve_phpunit_fixtures

Improve PHPUnit fixtures
This commit is contained in:
Matt Lantz authored and GitHub committed 2020-12-15 15:13:31 -05:00
commit db28e1a903
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ use Mockery as m;
class FormAccessibleTest extends PHPUnit\Framework\TestCase
{
public function setUp()
protected function setUp(): void
{
Capsule::table('models')->truncate();
Model::unguard();
+2 -2
View File
@@ -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);
@@ -46,7 +46,7 @@ class FormBuilderTest extends PHPUnit\Framework\TestCase
/**
* Destroy the test environment.
*/
public function tearDown()
protected function tearDown(): void
{
m::close();
}
+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();
}