mercredi 7 juin 2017

Laravel phpunit testing mail sending

Im trying to test mail sending in laravel 5.1 application. I need run tests on prod server. I need MAIL_DRIVER=log at app environment for running test. And MAIL_DRIVER=smtp for production in my .env file. I edited phpunit.xml at application root folder and added line:

<env name="MAIL_DRIVER" value="log"/>

<php>
     <env name="APP_ENV" value="testing"/>
     <env name="CACHE_DRIVER" value="array"/>
     <env name="SESSION_DRIVER" value="array"/>
     <env name="QUEUE_DRIVER" value="sync"/>
     <env name="MAIL_DRIVER" value="log"/>
</php>

The problem is when I running test it still use MAIL_DRIVER=smtp

Any idea what is wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire