public function testHandleLoggable() { $loggableCollectionClass = new LoggableCollectionClass(); $loggableCollectionClass->setName('testCollectionName'); $collection = new PersistentCollection($this->em, get_class($loggableCollectionClass), array($loggableCollectionClass)); $collection->setDirty(true); $this->loggableClass->setCollection($collection); $this->em->persist($this->loggableClass); //log with out user $this->loggableManager->handleLoggable($this->em); //log with user $this->loggableManager->setUsername('testUser'); $this->loggableManager->handleLoggable($this->em); //log delete $this->em->remove($this->loggableClass); $this->loggableManager->handleLoggable($this->em); }
/** * @test */ public function testHandlePostPersist() { $loggableClass = new LoggableClass(); $loggableClass->setName('testName'); $this->loggableManager->handlePostPersist($loggableClass, $this->em); }