Skip to content

Commit 854009c

Browse files
committed
Remove obsolete tests; the xs:duration values are thoroughly tested by the xml-common library
1 parent 49b02a5 commit 854009c

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

tests/src/SimpleSAML/Utils/TimeTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use PHPUnit\Framework\Attributes\CoversClass;
88
use PHPUnit\Framework\TestCase;
99
use ReflectionClass;
10-
use SimpleSAML\Assert\AssertionFailedException;
1110
use SimpleSAML\Configuration;
1211
use SimpleSAML\Error;
1312
use 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
}

0 commit comments

Comments
 (0)