From e75d910d3549011da49dd05aa903405c3e26defd Mon Sep 17 00:00:00 2001 From: michalsn Date: Sat, 12 Jul 2025 09:25:16 +0200 Subject: [PATCH] chore: fix data provider name and order by cs-fix --- tests/PushAndPopWithDelayTest.php | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/PushAndPopWithDelayTest.php b/tests/PushAndPopWithDelayTest.php index 70a85a3..f06b0f9 100644 --- a/tests/PushAndPopWithDelayTest.php +++ b/tests/PushAndPopWithDelayTest.php @@ -38,25 +38,7 @@ protected function setUp(): void $this->config = config(QueueConfig::class); } - public static function handlerProvider(): iterable - { - return [ - [ - 'database', // name - 'CodeIgniter\Queue\Handlers\DatabaseHandler', // class - ], - [ - 'redis', - 'CodeIgniter\Queue\Handlers\RedisHandler', - ], - [ - 'predis', - 'CodeIgniter\Queue\Handlers\PredisHandler', - ], - ]; - } - - #[DataProvider('handlerProvider')] + #[DataProvider('providePushAndPopWithDelay')] public function testPushAndPopWithDelay(string $name, string $class): void { Time::setTestNow('2023-12-29 14:15:16'); @@ -100,4 +82,22 @@ public function testPushAndPopWithDelay(string $name, string $class): void $payload = ['job' => 'success', 'data' => ['key1' => 'value1'], 'metadata' => []]; $this->assertSame($payload, $result->payload); } + + public static function providePushAndPopWithDelay(): iterable + { + return [ + [ + 'database', // name + 'CodeIgniter\Queue\Handlers\DatabaseHandler', // class + ], + [ + 'redis', + 'CodeIgniter\Queue\Handlers\RedisHandler', + ], + [ + 'predis', + 'CodeIgniter\Queue\Handlers\PredisHandler', + ], + ]; + } }