Daniel-Pablo's avatar

Make JOBS and EVENT tests been called inside the TEST DB, how to?

Hi team, I am sending a JOB to run, when Redis appear it makes the call but in the normal Database not in the one I set up on my phpunit.xml <env name="DB_DATABASE" value="testing"/> so HOW TO make Redis check in that database?

hope it makes sense, that when he jumps from testing DB to normalDB there are no users thus all the users are created in the testing DB...

Thanks in advance

0 likes
2 replies
Daniel-Pablo's avatar

I want to add, that I was trying to dispatch a Job and an event and then test the results of the HANDLE method, and that's not the way to do it, the execution codes that are inside the HANDLE method should be tested separated and NOT TEST THE JOB or EVENT trying to get a result and then assert, NO that's not the way, you should test what will go inside the handle method in the tests, after that if you want to test that the JOB or event can be dispatched that is something apart, hope this helps someone else

Please or to participate in this conversation.