eZ\Publish\Core\FieldType\Tests\DateTest::provideValidInputForAcceptValue PHP Method

provideValidInputForAcceptValue() public method

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 function provideValidInputForAcceptValue()
    {
        $dateTime = new DateTime();
        return array(array(null, new DateValue()), array($dateString = '2012-08-28 12:20 EST', new DateValue(new DateTime($dateString))), array($timestamp = 1346149200, new DateValue(clone $dateTime->setTimestamp($timestamp))), array(DateValue::fromTimestamp(1372895999), new DateValue($dateTime->setTimestamp(1372895999)->setTime(0, 0, 0))), array($dateTime = new DateTime(), new DateValue($dateTime)));
    }