If you use Queue::fake() the test will be mocked. So instead of putting the jobs in Redis, it will keep an array with the fired jobs that are in the queue. This way you can assert against it and see if the correct number of events have been fired. Because of that, the connection name is not Redis anymore.
In general, you don't want to run your tests against a Redis queue. In this case, you have to trust the framework that they provide the tools to make this work. The only thing you should care about in your test is if the business logic is happening correctly. So in your case is the notification sent and so on.
Don't I need to test the redis connection itself? to be sure if redis is installed in the server and ready to make operations. or I should not care about testing this?
Yeah, you should double-check if the Redis connection is working on your server. In general, the code for the Redis part is part of the framework. It your jobs locally work with the sync driver you can assume they work with the redis driver ;)
Hi @bobbybouwmann it's possible to change the phpunit to this?
<env name="QUEUE_CONNECTION" value="redis"/>
and make the test with Redis directly? or I should use SYNC? how can I assume that if my jobs locally work with the sync driver I can assume they work with the Redis driver? can you please give more information about this, is very interesting and important to understand, thanks in advance @bobbybouwmann