zenstruck / foundry

A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine.
https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html
MIT License
609 stars 63 forks source link

[2.0] Re-add `assertPersisted()` & `assertNotPersisted()` #661

Open simondaigre opened 3 days ago

simondaigre commented 3 days ago

In 2.0, assertPersisted() and assertNotPersisted() were removed without replacement.

These methods was really useful. Is it possible to re-add them ?

nikophil commented 3 days ago

I'm not 100% sure why they have been removed. @kbond any hints?

kbond commented 3 days ago

I'm not 100% sure why they have been removed. @kbond any hints?

I didn't think they were useful - if they are, I'm ok re-adding.

simondaigre commented 3 days ago

I'm using them in some application tests, for example to check if the object was deleted by the controller.

kbond commented 3 days ago

Ok, that's a super fair use-case. I'll get these re-added.