/** * @param array $fixtures * @param $dropDatabaseBefore * * @return array */ protected function loadFixtures(array $fixtures, $dropDatabaseBefore = true) { if ($dropDatabaseBefore) { $this->fixtureManager->persist([], true); } $fixturesFiles = array_map([$this, 'getFixtureFile'], $fixtures); $objects = $this->fixtureManager->loadFiles($fixturesFiles); $this->fixtureManager->persist($objects); return $objects; }
public function testPersistAndDrop() { $this->schemaToolMock->expects($this->once())->method('dropSchema'); $this->schemaToolMock->expects($this->once())->method('createSchema'); $this->manager->persist(array(), true); }