File tree Expand file tree Collapse file tree
tests/src/SimpleSAML/Utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77use PHPUnit \Framework \Attributes \CoversClass ;
88use PHPUnit \Framework \TestCase ;
99use ReflectionClass ;
10- use SimpleSAML \Assert \AssertionFailedException ;
1110use SimpleSAML \Configuration ;
1211use SimpleSAML \Error ;
1312use SimpleSAML \Utils ;
@@ -170,22 +169,5 @@ public function testParseDuration(): void
170169 $ timeUtils ->parseDuration ('PT1M ' ),
171170 "Failure testing for 1 minute over current time. " ,
172171 );
173-
174- // test invalid durations
175- try {
176- // invalid string
177- $ timeUtils ->parseDuration ('abcdefg ' );
178- $ this ->fail ("Did not fail with invalid ISO 8601 duration. " );
179- } catch (AssertionFailedException $ e ) {
180- $ this ->assertStringMatchesFormat ('\'%s \' is not a valid xs:duration ' , $ e ->getMessage ());
181- }
182-
183- try {
184- // missing T delimiter
185- $ timeUtils ->parseDuration ('P1S ' );
186- $ this ->fail ("Did not fail with duration missing T delimiter. " );
187- } catch (AssertionFailedException $ e ) {
188- $ this ->assertStringMatchesFormat ('\'%s \' is not a valid xs:duration ' , $ e ->getMessage ());
189- }
190172 }
191173}
You can’t perform that action at this time.
0 commit comments