public function testDates() { $startDate = new \DateTime("22-07-2014 22:00"); $endDate = new \DateTime("22-07-2014 23:30"); $result = new Result('export', $startDate, $endDate, 10); $this->assertSame($startDate, $result->getStartTime()); $this->assertSame($endDate, $result->getEndTime()); $this->assertInstanceOf('DateInterval', $result->getElapsed()); }