eZ\Publish\Core\FieldType\Tests\TimeTest::provideValidInputForAcceptValue PHP Метод

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

Returns an array of data provider sets with 2 arguments: 1. The valid input to acceptValue(), 2. The expected return value from acceptValue(). For example: return array( array( null, null ), array( __FILE__, new BinaryFileValue( array( 'path' => __FILE__, 'fileName' => basename( __FILE__ ), 'fileSize' => filesize( __FILE__ ), 'downloadCount' => 0, 'mimeType' => 'text/plain', ) ) ), ... );
public provideValidInputForAcceptValue ( ) : array
Результат array
    public function provideValidInputForAcceptValue()
    {
        $dateTime = new DateTime();
        $secondsInDay = 24 * 60 * 60;
        return array(array(null, new TimeValue()), array('2012-08-28 12:20', new TimeValue(44400)), array('2012-08-28 12:20 Europe/Berlin', new TimeValue(44400)), array('2012-08-28 12:20 Asia/Sakhalin', new TimeValue(44400)), array($dateTime->setTimestamp(1372896001)->getTimestamp(), new TimeValue(($secondsInDay + $dateTime->getOffset() + 1) % $secondsInDay)), array(TimeValue::fromTimestamp($timestamp = 1346149200), new TimeValue($dateTime->setTimestamp($timestamp)->getTimestamp() - $dateTime->setTime(0, 0, 0)->getTimestamp())), array(clone $dateTime, new TimeValue($dateTime->getTimestamp() - $dateTime->setTime(0, 0, 0)->getTimestamp())));
    }