Skip to content

Commit db14749

Browse files
authored
Merge pull request #665 from phil-davis/test-percent
test: extra property is allowed in VTODO
2 parents 091a161 + c14420f commit db14749

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/VObject/Component/VTodoTest.php

+25
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,31 @@ public function testValidate(): void
8888
self::assertEquals([], $messages);
8989
}
9090

91+
public function testValidateExtraProperty(): void
92+
{
93+
$input = <<<HI
94+
BEGIN:VCALENDAR
95+
VERSION:2.0
96+
PRODID:YoYo
97+
BEGIN:VTODO
98+
UID:1234-21355-123156
99+
DTSTAMP:20140402T183400Z
100+
PERCENT:80
101+
END:VTODO
102+
END:VCALENDAR
103+
HI;
104+
105+
$obj = Reader::read($input);
106+
107+
$warnings = $obj->validate();
108+
$messages = [];
109+
foreach ($warnings as $warning) {
110+
$messages[] = $warning['message'];
111+
}
112+
113+
self::assertEquals([], $messages);
114+
}
115+
91116
public function testValidateInvalid(): void
92117
{
93118
$input = <<<HI

0 commit comments

Comments
 (0)