How to rollback transactions when doing functional testing with Symfony2

前端 未结 3 752
深忆病人
深忆病人 2021-02-09 23:08

I\'m trying to write a functional test for my project in Symfony2. I\'d like to test if a user can access a page, fill up a form and submit it. I\'m trying to find a way to roll

3条回答
  •  不要未来只要你来
    2021-02-09 23:49

    I would recommend to use this bundle: https://packagist.org/packages/dama/doctrine-test-bundle

    Its very easy to setup and will roll-back any database changes automatically after every single testcase. No need to implement any custom things.

提交回复
热议问题