Neos\Flow\Tests\Unit\Validation\Validator\DateTimeValidatorTest::returnsTrueForCorrectValues PHP Method

returnsTrueForCorrectValues() public method

    public function returnsTrueForCorrectValues()
    {
        $sampleValidDateTime = '10.08.2010, 18:00 CEST';
        $this->mockDatetimeParser->expects($this->once())->method('parseDateAndTime', $sampleValidDateTime)->will($this->returnValue(['parsed datetime']));
        $this->validatorOptions(['locale' => 'en_GB', 'formatLength' => I18n\Cldr\Reader\DatesReader::FORMAT_LENGTH_FULL, 'formatType' => I18n\Cldr\Reader\DatesReader::FORMAT_TYPE_DATETIME]);
        $this->inject($this->validator, 'datetimeParser', $this->mockDatetimeParser);
        $this->assertFalse($this->validator->validate($sampleValidDateTime)->hasErrors());
    }