/** * @test */ public function testGetAuditEntryFieldClass() { $user = $this->getDiamanteUser(); $this->auditEntityMapper->addAuditEntryFieldClass('Diamante\\UserBundle\\Entity\\DiamanteUser', 'Diamante\\DeskBundle\\Entity\\AuditField'); $result = $this->auditEntityMapper->getAuditEntryFieldClass($user); $this->assertEquals('Diamante\\DeskBundle\\Entity\\AuditField', $result); }
protected function setUp() { MockAnnotations::init($this); $this->auditEntityMapper->addAuditEntryClass('Diamante\\UserBundle\\Entity\\DiamanteUser', 'Diamante\\DeskBundle\\Entity\\Audit'); $this->auditEntityMapper->addAuditEntryFieldClass('Diamante\\UserBundle\\Entity\\DiamanteUser', 'Diamante\\DeskBundle\\Entity\\AuditField'); $this->container->expects($this->any())->method('get')->will($this->returnValue($this->oroAuditEntityMapper))->with($this->equalTo('oro_dataaudit.loggable.audit_entity_mapper')); $this->loggableManager = new LoggableManager('Oro\\Bundle\\DataAuditBundle\\Entity\\Audit', 'Oro\\Bundle\\DataAuditBundle\\Entity\\AuditField', $this->provider, $this->securityContextLink, $this->auditEntityMapper, $this->container); }
/** * @param $user * * @return string */ protected function getLogClass($user) { return $this->diamanteAuditEntityMapper->getAuditEntryClass($user); }