File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66namespace IC \Bundle \Base \TestBundle \Test \Functional ;
77
88use Doctrine \Common \Collections \ArrayCollection ;
9+ use Doctrine \Common \DataFixtures \Purger \ORMPurger ;
910use Symfony \Bundle \FrameworkBundle \Test \WebTestCase as BaseWebTestCase ;
1011use IC \Bundle \Base \TestBundle \Test \Loader ;
1112
@@ -24,6 +25,8 @@ abstract class WebTestCase extends BaseWebTestCase
2425
2526 const MANAGER_NAME = null ;
2627
28+ const FIXTURES_PURGE_MODE = ORMPurger::PURGE_MODE_DELETE ;
29+
2730 /**
2831 * @var boolean
2932 */
@@ -56,7 +59,7 @@ protected function setUp()
5659 return ;
5760 }
5861
59- $ fixtureLoader = new Loader \FixtureLoader ($ this ->client );
62+ $ fixtureLoader = new Loader \FixtureLoader ($ this ->client , static :: FIXTURES_PURGE_MODE );
6063 $ executor = $ fixtureLoader ->load (static ::MANAGER_NAME , $ fixtureList );
6164
6265 $ this ->referenceRepository = $ executor ->getReferenceRepository ();
Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ class FixtureLoader
4040 *
4141 * @param \Symfony\Bundle\FrameworkBundle\Client $client
4242 */
43- public function __construct (Client $ client )
43+ public function __construct (Client $ client, $ purgeMode = ORMPurger:: PURGE_MODE_DELETE )
4444 {
4545 $ this ->client = $ client ;
46- $ this ->purgeMode = ORMPurger:: PURGE_MODE_DELETE ;
46+ $ this ->purgeMode = $ purgeMode ;
4747 }
4848
4949 /**
You can’t perform that action at this time.
0 commit comments