public function ParserTest::testParseDateAsMappingValue in Lockr 7.3
File
- vendor/
symfony/ yaml/ Tests/ ParserTest.php, line 1539
Class
Namespace
Symfony\Component\Yaml\TestsCode
public function testParseDateAsMappingValue() {
$yaml = <<<'EOT'
date: 2002-12-14
EOT;
$expectedDate = new \DateTime();
$expectedDate
->setTimeZone(new \DateTimeZone('UTC'));
$expectedDate
->setDate(2002, 12, 14);
$expectedDate
->setTime(0, 0, 0);
$this
->assertEquals([
'date' => $expectedDate,
], $this->parser
->parse($yaml, Yaml::PARSE_DATETIME));
}