Example #1
0
 public function testConfigLog()
 {
     $userMock = $this->getMockForAbstractClass('Symfony\\Component\\Security\\Core\\User\\UserInterface');
     $this->assertEmpty($this->configLog->getId());
     $data = new \DateTime();
     $this->configLog->setLoggedAt($data);
     $this->assertEquals($data, $this->configLog->getLoggedAt());
     $this->configLog->setUser($userMock);
     $this->assertEquals($userMock, $this->configLog->getUser());
     $this->configLog->addDiff($this->configLogDiff);
     $this->assertEquals($this->configLogDiff, $this->configLog->getDiffs()->first());
     $diffsCollection = new ArrayCollection(array($this->configLogDiff));
     $this->configLog->setDiffs($diffsCollection);
     $this->assertEquals($diffsCollection, $this->configLog->getDiffs());
 }