Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 726d28c

Browse files
committed
✅ Test parsing invalid dates
1 parent ce5a28a commit 726d28c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Component/Yaml/Tests/InlineTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,15 @@ public function testParseNestedTimestampListAsDateTimeObject(string $yaml, int $
620620
$this->assertEquals($expectedNested, Inline::parse($yamlNested, Yaml::PARSE_DATETIME));
621621
}
622622

623+
public function testParseInvalidDate()
624+
{
625+
$inputValue = '2024-50-50';
626+
627+
$parseResult = Inline::parse($inputValue, Yaml::PARSE_DATETIME);
628+
629+
$this->assertSame('2024-50-50', $parseResult);
630+
}
631+
623632
/**
624633
* @dataProvider getDateTimeDumpTests
625634
*/

0 commit comments

Comments
 (0)