diff --git a/tests/Console/CommandMutexTest.php b/tests/Console/CommandMutexTest.php index 0743e6f43e7c..74abd562e542 100644 --- a/tests/Console/CommandMutexTest.php +++ b/tests/Console/CommandMutexTest.php @@ -7,12 +7,15 @@ use Illuminate\Contracts\Console\Isolatable; use Illuminate\Foundation\Application; use Mockery as m; +use Orchestra\Testbench\Concerns\InteractsWithMockery; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; class CommandMutexTest extends TestCase { + use InteractsWithMockery; + /** * @var Command */ @@ -23,13 +26,15 @@ class CommandMutexTest extends TestCase */ protected $commandMutex; + /** {@inheritdoc} */ + #[\Override] protected function setUp(): void { $this->command = new class extends Command implements Isolatable { public $ran = 0; - public function __invoke() + public function handle() { $this->ran++; } @@ -42,6 +47,13 @@ public function __invoke() $this->command->setLaravel($app); } + /** {@inheritdoc} */ + #[\Override] + protected function tearDown(): void + { + $this->tearDownTheTestEnvironmentUsingMockery(); + } + public function testCanRunIsolatedCommandIfNotBlocked() { $this->commandMutex->shouldReceive('create')