@@ -30,6 +30,28 @@ public function testLegacyOutputShowsWorkerVariables(): void
3030
3131 public function testLegacyOutputDefaultsEnabledToFalseWhenUnset (): void
3232 {
33+ // Legacy structure: a WORKER_* variable is present and there is no
34+ // queue-list key, so the enabled flag is unset and shown as "false".
35+ $ this ->setPleskEnv ([
36+ 'PLESK_EXT_LARAVEL_QUEUE_WORKER_TIMEOUT ' => '5 ' ,
37+ ]);
38+
39+ $ this ->artisan ('plesk-ext-laravel:list-env ' )
40+ ->expectsTable (['Parameter ' , 'Value ' ], [
41+ ['PLESK_EXT_LARAVEL_QUEUE_MULTIPLE_SUPPORTED ' , 'true ' ],
42+ ['PLESK_EXT_LARAVEL_QUEUE_WORKER_ENABLED ' , 'false ' ],
43+ ['PLESK_EXT_LARAVEL_QUEUE_WORKER_STOP_WHEN_EMPTY ' , '' ],
44+ ['PLESK_EXT_LARAVEL_QUEUE_WORKER_TIMEOUT ' , '5 ' ],
45+ ['PLESK_EXT_LARAVEL_QUEUE_WORKER_MAX_JOBS ' , '' ],
46+ ['PLESK_EXT_LARAVEL_QUEUE_WORKER_MAX_TIME ' , '' ],
47+ ])
48+ ->assertExitCode (0 );
49+ }
50+
51+ public function testEmptyEnvironmentOutputsLegacyFormat (): void
52+ {
53+ // No .env.plesk / nothing configured -> legacy format (no queue-list
54+ // row), so the extension treats it as the old package.
3355 $ this ->artisan ('plesk-ext-laravel:list-env ' )
3456 ->expectsTable (['Parameter ' , 'Value ' ], [
3557 ['PLESK_EXT_LARAVEL_QUEUE_MULTIPLE_SUPPORTED ' , 'true ' ],
@@ -42,6 +64,22 @@ public function testLegacyOutputDefaultsEnabledToFalseWhenUnset(): void
4264 ->assertExitCode (0 );
4365 }
4466
67+ public function testExplicitEmptyQueueListOutputsMultiQueueFormat (): void
68+ {
69+ // Only "PLESK_EXT_LARAVEL_QUEUE_LIST=" present -> the new format, because
70+ // the queue-list key is explicitly there.
71+ $ this ->setPleskEnv ([
72+ 'PLESK_EXT_LARAVEL_QUEUE_LIST ' => '' ,
73+ ]);
74+
75+ $ this ->artisan ('plesk-ext-laravel:list-env ' )
76+ ->expectsTable (['Parameter ' , 'Value ' ], [
77+ ['PLESK_EXT_LARAVEL_QUEUE_MULTIPLE_SUPPORTED ' , 'true ' ],
78+ ['PLESK_EXT_LARAVEL_QUEUE_LIST ' , '' ],
79+ ])
80+ ->assertExitCode (0 );
81+ }
82+
4583 public function testMultiQueueOutputListsEveryQueueParameter (): void
4684 {
4785 $ this ->setPleskEnv ([
0 commit comments