mardi 16 mai 2017

Pause/Wait Laravel Test

I am doing a Laravel 5.4 test and I need to do something manually (activating an e-mail code) before another test to come up. Here's my sample algorithm.

  1. I'll send an e-mail for activation.
  2. Test if the e-mail was sent.
  3. Wait 'till I activate the email.
  4. Check if the e-mail is activated.

In this example I need to wait 'til I activate the e-mail code.

Is there a way to pause/sleep/wait on the Laravel test? There's no sleep(), wait(), readline(), or pause() function in Laravel test.

P.S. Pls focus on the wait query and not on e-mail (this is just an example).

Aucun commentaire:

Enregistrer un commentaire