Skip to content

Commit 5e53e2b

Browse files
Merge pull request #34 from stackkit/bugfix/mutex
Fix tests
2 parents 491ff62 + e0b4305 commit 5e53e2b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/TaskHandlerTest.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Tests;
44

5-
use Illuminate\Console\Application as ConsoleApplication;
5+
use Illuminate\Console\Scheduling\Schedule;
66
use Illuminate\Support\Facades\Event;
77
use PHPUnit\Framework\Attributes\Test;
88
use Stackkit\LaravelGoogleCloudScheduler\OpenIdVerificator;
@@ -62,9 +62,7 @@ public function it_prevents_overlapping_if_the_command_is_scheduled_without_over
6262
$this->assertLoggedLines(1);
6363
$this->assertLogged('TestCommand');
6464

65-
$expression = '* * * * *';
66-
$command = ConsoleApplication::formatCommandString('test:command');
67-
$mutex = 'framework'.DIRECTORY_SEPARATOR.'schedule-'.sha1($expression.$command);
65+
$mutex = head(app(Schedule::class)->events())->mutexName();
6866

6967
cache()->add($mutex, true, 60);
7068

0 commit comments

Comments
 (0)