Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 726d28c

Browse filesBrowse files
committed
✅ Test parsing invalid dates
1 parent ce5a28a commit 726d28c
Copy full SHA for 726d28c

File tree

1 file changed

+9
-0
lines changed
Filter options

1 file changed

+9
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Tests/InlineTest.php
+9Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.