How to use fixtures in WebTestCase PHPUnit
问题 what I try to accomplish is: Loading fresh fixtures in PHP code before a WebTestCase is executed. As far as i know this code should do its work: // Get a kernel instance and boot it up! static::$kernel = static::createKernel(); static::$kernel->boot(); // Get entity manager $em = static::$kernel->getContainer()->get('doctrine_phpcr.odm.default_document_manager'); $loader = new Loader(); foreach (self::$fixturesRequired as $fixtureClass) { $loader->addFixture(new $fixtureClass); } $purger =