[14.x] Fix `queue:pause` passing the connection and queue in the wrong order

Merged
SU
22d ago
+16-1

#61076 changed QueueManager::pause() to take the queue first (pause($queue, $connection = null)) and updated both commands. When 13.x was merged in afterwards, the global pause switch from #61126 brought the old call back into PauseCommand, so it now passes the connection as the queue name:

php artisan queue:pause redis:emails
# INFO  Job processing on queue [redis:emails] has been paused.
Queue::isPaused('emails', 'redis'); // false
Queue::isPaused('redis', 'emails'); // true

The command reports success, but workers on redis:emails keep processing jobs. queue:resume redis:emails already uses the new order, so it can't clear the key that was written. The existing tests only run queue:pause default, where the default connection covers it up.

This swaps the arguments back and adds a test that pauses and resumes a named connection and queue.