From a4e2721fef6eb8d5f7a85eac5f3c036ed1a15212 Mon Sep 17 00:00:00 2001 From: Wimski Date: Thu, 7 May 2020 16:50:46 +0200 Subject: [PATCH] Fixed test issues --- tests/CloneableTest.php | 3 +++ tests/FunctionalTest.php | 4 +++- tests/ServiceProviderTest.php | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/CloneableTest.php b/tests/CloneableTest.php index b820fd7..de872d5 100644 --- a/tests/CloneableTest.php +++ b/tests/CloneableTest.php @@ -3,6 +3,7 @@ // Deps use Bkwld\Cloner\Stubs\Article; use Mockery as m; +use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use PHPUnit\Framework\TestCase; /** @@ -10,6 +11,8 @@ */ class CloneableTest extends TestCase { + use MockeryPHPUnitIntegration; + public function testDuplicate() { m::mock('alias:App', [ diff --git a/tests/FunctionalTest.php b/tests/FunctionalTest.php index 87ea6f4..49ba47f 100644 --- a/tests/FunctionalTest.php +++ b/tests/FunctionalTest.php @@ -15,11 +15,13 @@ use League\Flysystem\Vfs\VfsAdapter as Adapter; use League\Flysystem\MountManager; use Mockery as m; +use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use VirtualFileSystem\FileSystem as Vfs; use PHPUnit\Framework\TestCase; class FunctionalTest extends TestCase { + use MockeryPHPUnitIntegration; private $article; @@ -56,7 +58,7 @@ protected function initUpchuck() */ protected function mockEvents() { - return m::mock('Illuminate\Contracts\Events\Dispatcher', ['dispatch' => null]); + return m::mock('Illuminate\Events\Dispatcher', ['dispatch' => null]); } // https://github.com/laracasts/TestDummy/blob/master/tests/FactoryTest.php#L18 diff --git a/tests/ServiceProviderTest.php b/tests/ServiceProviderTest.php index 8dd84d7..4ee5059 100644 --- a/tests/ServiceProviderTest.php +++ b/tests/ServiceProviderTest.php @@ -3,11 +3,14 @@ // Deps use Bkwld\Cloner\ServiceProvider; use Mockery as m; +use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use PHPUnit\Framework\TestCase; class ServiceProviderTest extends TestCase { + use MockeryPHPUnitIntegration; + function testProvides() { $app = m::mock('Illuminate\Foundation\Application'); $provider = new ServiceProvider($app); @@ -27,4 +30,4 @@ function testRegister() { $provider->register(); } -} \ No newline at end of file +}