Fakerino\Test\FakeData\Generator\DateGeneratorTest::testGenerateWithLengthOption PHP Méthode

testGenerateWithLengthOption() public méthode

public testGenerateWithLengthOption ( $format, $startDate, $endDate, $pattern )
    public function testGenerateWithLengthOption($format, $startDate, $endDate, $pattern)
    {
        $map = array(array('format', $format), array('startDate', $startDate), array('endDate', $endDate));
        $this->mockCaller->expects($this->exactly(3))->method('getOption')->will($this->returnValueMap($map));
        $fakeDate = $this->dateGenerator->generate();
        $this->assertTrue((bool) preg_match($pattern, $fakeDate), sprintf('The date %s doesn\'t match the expression %s', $fakeDate, $pattern));
    }