assertSame($date, $sut->getDay()); $this->assertEquals([], $sut->getDetails()); $this->assertEquals(12340, $sut->getTotalDuration()); $this->assertEquals(197.25956, $sut->getTotalRate()); } public function testAllowedMonths() { $date = new DateTime('-8 hours'); $sut = new Day($date, 12340, 197.25956); $sut->setTotalDuration(999.27); $sut->setTotalRate(0.123456789); $this->assertEquals(999, $sut->getTotalDuration()); $this->assertEquals(0.123456789, $sut->getTotalRate()); } public function testSetDetails() { $sut = new Day(new DateTime(), 12340, 197.25956); $sut->setDetails(['foo' => ['bar' => '1212e'], 'hello' => 'world']); $this->assertEquals(['foo' => ['bar' => '1212e'], 'hello' => 'world'], $sut->getDetails()); } }