public function testJsonSerialize() { $dateTimeStorage = new DateTimeStorage(); $dateTimeStorage->attach(new \DateTime('2016-02-23')); $dateTimeStorage->attach(new \DateTime('2016-02-24')); $dateTimeStorage->attach(new \DateTime('2016-02-25')); $this->assertJsonStringEqualsJsonFile(__DIR__ . '/Expected/DateTimeStorage/testJsonSerialize.json', json_encode($dateTimeStorage)); }
public function testHash() { $dateTimeStorage = new DateTimeStorage(); $dateTime = new \DateTime('2015-07-08'); $this->assertEquals('2015-07-08', $dateTimeStorage->getHash($dateTime)); }