Business\Tests\DayTest::testGetClosestOpeningTimeBeforeInsideInterval PHP Метод

testGetClosestOpeningTimeBeforeInsideInterval() публичный Метод

    public function testGetClosestOpeningTimeBeforeInsideInterval()
    {
        $context = new \DateTime('2015-05-25');
        $day = new Day(Days::MONDAY, [['09:00', '10 AM'], ['12:00', '2 pm'], ['14:30', '18:30']]);
        $closest = $day->getClosestOpeningTimeBefore(new Time('13', '00'), $context);
        $this->assertSame(13, $closest->getHours());
        $this->assertSame(0, $closest->getMinutes());
    }