diff --git a/tests/Feature/ShowJobsCommandTest.php b/tests/Feature/ShowJobsCommandTest.php index a4430c8..14025fe 100644 --- a/tests/Feature/ShowJobsCommandTest.php +++ b/tests/Feature/ShowJobsCommandTest.php @@ -1,22 +1,25 @@ assertSuccessful() ->expectsOutput('No matching delayed jobs found.'); }); -it('filters by --queue', function () { +it('filters by --queue', function (): void { $payload = json_encode([ 'uuid' => 'uuid-queue-1', 'displayName' => 'App\\Jobs\\QueuedJob', @@ -34,7 +37,7 @@ ->expectsOutput(json_encode(['count' => 1], JSON_PRETTY_PRINT)); }); -it('filters by --job (partial match)', function () { +it('filters by --job (partial match)', function (): void { $payload = json_encode([ 'uuid' => 'uuid-job-1', 'displayName' => 'App\\Jobs\\TestNotificationJob', @@ -48,7 +51,7 @@ ->expectsOutput(json_encode(['count' => 1], JSON_PRETTY_PRINT)); }); -it('filters by --uuid (exact match)', function () { +it('filters by --uuid (exact match)', function (): void { $uuid = 'exact-uuid-1234'; $payload = json_encode([ 'uuid' => $uuid, @@ -63,7 +66,7 @@ ->expectsOutput(json_encode(['count' => 1], JSON_PRETTY_PRINT)); }); -it('filters by --identifier (serialized in payload)', function () { +it('filters by --identifier (serialized in payload)', function (): void { $identifier = 42; $serialized = serialize((object) ['id' => $identifier]); @@ -80,7 +83,7 @@ ->expectsOutput(json_encode(['count' => 1], JSON_PRETTY_PRINT)); }); -it('filters jobs by --from and --to date range', function () { +it('filters jobs by --from and --to date range', function (): void { $today = now(); $releaseAt = $today->copy()->addHours(2); // falls within today @@ -99,7 +102,7 @@ ->and($json['jobs'][0]['job'])->toBe('App\\Jobs\\ScheduledJob'); }); -it('respects --limit and --page', function () { +it('respects --limit and --page', function (): void { Redis::flushall(); foreach (range(1, 5) as $i) { @@ -131,7 +134,7 @@ expect($jsonPage2['jobs'][1]['job'])->toBe('App\\Jobs\\PaginatedJob4'); }); -it('outputs in JSON when --json is used', function () { +it('outputs in JSON when --json is used', function (): void { Redis::flushall(); Redis::zadd('queues:default:delayed', time() + 300, json_encode([ @@ -151,7 +154,7 @@ ->and($data['jobs'][0]['job'])->toBe('App\\Jobs\\JsonJob'); }); -it('shows total count when using --count', function () { +it('shows total count when using --count', function (): void { Redis::zadd('queues:default:delayed', time() + 300, json_encode([ 'uuid' => 'uuid-count', 'displayName' => 'App\\Jobs\\CountingJob', diff --git a/tests/Pest.php b/tests/Pest.php index d47845c..77ac8a7 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,5 +1,7 @@ in(__DIR__); diff --git a/tests/TestCase.php b/tests/TestCase.php index 63cc806..f50349f 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,8 +4,8 @@ namespace Tests; -use Pdmfc\RedisQueueInspector\Providers\RedisQueueInspectorServiceProvider; use Orchestra\Testbench\TestCase as Orchestra; +use Pdmfc\RedisQueueInspector\Providers\RedisQueueInspectorServiceProvider; abstract class TestCase extends Orchestra {