Neos\Eel\Tests\Unit\DateHelperTest::calculationWorks PHP Метод

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

public calculationWorks ( $method, $dateTime, $interval, $expected )
    public function calculationWorks($method, $dateTime, $interval, $expected)
    {
        $timestamp = $dateTime->getTimestamp();
        $helper = new DateHelper();
        $result = $helper->{$method}($dateTime, $interval);
        $this->assertEquals($timestamp, $dateTime->getTimeStamp(), 'DateTime should not be modified');
        $this->assertEquals($expected, $result->format('Y-m-d H:i:s'));
    }