Commits new objects and changes to objects in the current persistence
session into the backend
public persistAll ( boolean $onlyWhitelistedObjects = false ) : void | ||
$onlyWhitelistedObjects | boolean | If TRUE an exception will be thrown if there are scheduled updates/deletes or insertions for objects that are not "whitelisted" (see AbstractPersistenceManager::whitelistObject()) |
return | void |
/** * @test * @expectedException \Neos\Flow\Error\Exception */ public function persistAllReconnectsConnectionOnFailure() { $this->mockEntityManager->expects($this->exactly(2))->method('flush')->will($this->throwException(new FlowError\Exception('Dummy connection error'))); $this->mockConnection->expects($this->at(0))->method('close'); $this->mockConnection->expects($this->at(1))->method('connect'); $this->persistenceManager->persistAll(); }