Skip to content
Snippets Groups Projects
Commit ae37e033 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction : Test des timestamps plutôt que des DateTime à cause d'un soucis de timezone...!

parent 7fb61365
No related branches found
No related tags found
No related merge requests found
...@@ -141,14 +141,16 @@ class GroupTest extends PHPUnit_Framework_TestCase ...@@ -141,14 +141,16 @@ class GroupTest extends PHPUnit_Framework_TestCase
$this->assertEquals(TestAssetPeople::$data1['dn'], $entity->getDn()); $this->assertEquals(TestAssetPeople::$data1['dn'], $entity->getDn());
$this->assertEquals(TestAssetPeople::$data1['cn'], $entity->getCn()); $this->assertEquals(TestAssetPeople::$data1['cn'], $entity->getCn());
$this->assertEquals(TestAssetPeople::$data1['member'], $entity->getMember()); $this->assertEquals(TestAssetPeople::$data1['member'], $entity->getMember());
$this->assertEquals(new \DateTime(TestAssetPeople::$data1['supanngroupedatefin']), $entity->getSupannGroupeDateFin()); $expectedDate = new \DateTime(TestAssetPeople::$data1['supanngroupedatefin']);
$this->assertEquals($expectedDate->getTimestamp(), $entity->getSupannGroupeDateFin()->getTimestamp());
$entity = new Group(TestAssetPeople::$data2); $entity = new Group(TestAssetPeople::$data2);
$this->assertEquals(TestAssetPeople::$data2['description'], $entity->getDescription()); $this->assertEquals(TestAssetPeople::$data2['description'], $entity->getDescription());
$this->assertEquals(TestAssetPeople::$data2['dn'], $entity->getDn()); $this->assertEquals(TestAssetPeople::$data2['dn'], $entity->getDn());
$this->assertEquals(TestAssetPeople::$data2['cn'], $entity->getCn()); $this->assertEquals(TestAssetPeople::$data2['cn'], $entity->getCn());
$this->assertEquals(TestAssetPeople::$data2['member'], $entity->getMember()); $this->assertEquals(TestAssetPeople::$data2['member'], $entity->getMember());
$this->assertEquals(new \DateTime(TestAssetPeople::$data2['supanngroupedatefin']), $entity->getSupannGroupeDateFin()); $expectedDate = new \DateTime(TestAssetPeople::$data2['supanngroupedatefin']);
$this->assertEquals($expectedDate->getTimestamp(), $entity->getSupannGroupeDateFin()->getTimestamp());
} }
public function testToStringReturnsString() public function testToStringReturnsString()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment