public function testFixtureManager() { $this->loader->expects($this->once())->method('load')->will($this->returnValue(new FixtureCollection())); $this->executor->expects($this->once())->method('execute'); $this->persister->expects($this->once())->method('flush'); $this->eventDispatcher->expects($this->exactly(5))->method('dispatch'); $this->fixtureManager->load(null); }
/** * * @param FixtureCollection $collection */ protected function persist(FixtureCollection $collection) { foreach ($collection as $fixture) { foreach ($fixture as $data) { $this->persister->persist($data); } } $this->persister->flush(); }