panther icon indicating copy to clipboard operation
panther copied to clipboard

ServerExtension breaks Hautelook/AliceBundle's refresh database

Open Growiel opened this issue 4 years ago • 3 comments

Hautelook/AliceBundle provides a helper to repopulate the database after each test when using Panther (they specifically advertise it as "They are particularly helpful [...] when using Panther.": https://github.com/hautelook/AliceBundle#database-testing

It relies on repopulating the database when the kernel is booted up, which usually happens between each test file.

However as soon as we enable the Panther\ServerExtension, the repopulating doesn't happen anymore. I can of course just disable the ServerExtension but I'd lose the speed benefits and interactive debugging.

I get that the whole point of the extension is too keep Chrome alive, and thus not reloading the Client and the Kernel each time. Maybe my real question is: how to reset the database between each tests when using Panther and the ServerExtension ?

As we all know, we cannot use DAMA/doctrine-test-bundle when using Panther, but the need to clean the database before each test does remain.

AliceBundle is one of the most popular way to write fixtures, it'd be awesome if it could work hand in hand with Panther.

Thanks !

Growiel avatar Apr 27 '21 19:04 Growiel

Hello, have you found a solution?

I also use DAMA/doctrine-test-bundle to rollback database transactions between each test, but like you say if using Panther it doesn't work.

Were you able to get around this?

bastien70 avatar Nov 02 '21 12:11 bastien70

Sadly no. Although I haven't used Alice since (changed company and new one doesn't use it) so I don't know if anything changed.

Growiel avatar Nov 03 '21 21:11 Growiel

Have a look at this. You can deactivate DAMA per test-class.

DigitalTimK avatar Feb 04 '22 16:02 DigitalTimK