public function test_after_date_is_initialised_without_before_date() { $range = new DateRange($expected = Carbon::today()->subSecond(), null); $this->assertEquals($expected, $range->getAfter()); }
public function test_getAfter_returns_a_new_carbon_instance_with_correct_value() { $range = new DateRange($after = Carbon::today()->subSecond(), Carbon::today()->endOfDay()->addSecond()); $this->assertEquals(Carbon::today()->subSecond(), $range->getAfter()); $this->assertTrue($after !== $range->getAfter()); }