/** * Controls cloning of the object manager. Cloning should only be used within unit tests. * * @return void * @author Robert Lemke <*****@*****.**> */ public function __clone() { $this->singletonObjectsRegistry = clone $this->singletonObjectsRegistry; $this->objectFactory = clone $this->objectFactory; $this->objectFactory->injectObjectManager($this); }