From 20f2993539e2ec66579e21dec6ef32f1d502f496 Mon Sep 17 00:00:00 2001 From: Keller Martin Date: Tue, 18 Jun 2024 17:19:37 -0400 Subject: [PATCH] Remove Unnecessary Test testUniqueJobsAreNotDispatched() --- tests/Integration/Queue/UniqueJobTest.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/tests/Integration/Queue/UniqueJobTest.php b/tests/Integration/Queue/UniqueJobTest.php index 36eb9aeb5cb7..d2396852dfec 100644 --- a/tests/Integration/Queue/UniqueJobTest.php +++ b/tests/Integration/Queue/UniqueJobTest.php @@ -10,7 +10,6 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Support\Facades\Bus; use Orchestra\Testbench\Attributes\WithMigration; #[WithMigration] @@ -25,28 +24,6 @@ protected function defineEnvironment($app) $app['config']->set('cache.default', 'database'); } - public function testUniqueJobsAreNotDispatched() - { - Bus::fake(); - - UniqueTestJob::dispatch(); - $this->runQueueWorkerCommand(['--once' => true]); - Bus::assertDispatched(UniqueTestJob::class); - - $this->assertFalse( - $this->app->get(Cache::class)->lock($this->getLockKey(UniqueTestJob::class), 10)->get() - ); - - Bus::assertDispatchedTimes(UniqueTestJob::class); - UniqueTestJob::dispatch(); - $this->runQueueWorkerCommand(['--once' => true]); - Bus::assertDispatchedTimes(UniqueTestJob::class); - - $this->assertFalse( - $this->app->get(Cache::class)->lock($this->getLockKey(UniqueTestJob::class), 10)->get() - ); - } - public function testLockIsReleasedForSuccessfulJobs() { UniqueTestJob::$handled = false;