Skip to content

Testing: is RefreshDatabase efficient enough? Got a proposal. #36019

Closed Answered by LastDragon-ru
pabloelcolombiano asked this question in Ideas
Discussion options

You must be logged in to vote

A question: does this work if I use transactions in my tests, or will that collide with the test suite transactions?

It depends... + AFAIK it conflicts with #35422 (not yet tested)

A proposal: CakePHP has a test suite light, that cleans up the dirty tables before each test, without dropping the tables at any times.

You can extend RefreshDatabase to make it smarter, eg https://github.com/LastDragon-ru/lara-asp/blob/master/packages/testing/src/Database/RefreshDatabaseIfEmpty.php 😀

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pabloelcolombiano
Comment options

Answer selected by pabloelcolombiano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants