Set up Laravel 5.4 with Dusk using phpunit.xml, .env.dusk.local, and an sqlite in-memory database

后端 未结 1 1595
说谎
说谎 2021-01-18 02:35

The title says it all. I would like to know how to properly set up a new Laravel 5.4 project with Dusk, using an in-memory SQLite database.

I can run the tests, but

相关标签:
1条回答
  • 2021-01-18 03:06

    You cannot.

    The important thing to note is that for this kind of end-to-end test, Dusk will not be able to control the environment as it will open a separate process. An in-memory SQLite would only exists under Dusk process and the real-browser hitting the application would have no knowledge of the database Dusk created, making it impossible to assert anything in the database.

    https://github.com/laravel/dusk/issues/110

    https://github.com/laravel/dusk/issues/73

    0 讨论(0)
提交回复
热议问题