Skip to content

Commit 70fe7fb

Browse files
committed
test(crl): expand URL parser data providers
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent d3c3b2f commit 70fe7fb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/php/Unit/Service/Crl/CrlUrlParserServiceTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ public static function validUrlProvider(): array {
8080
'/index.php/apps/libresign/crl/libresign_ABC123_10_o.crl',
8181
['instanceId' => 'ABC123', 'generation' => 10, 'engineType' => 'o'],
8282
],
83+
'Absolute URL with query string' => [
84+
'https://cloud.example.com/index.php/apps/libresign/crl/libresign_ab12_44_c.crl?download=1',
85+
['instanceId' => 'ab12', 'generation' => 44, 'engineType' => 'c'],
86+
],
87+
'Absolute URL with fragment' => [
88+
'https://cloud.example.com/apps/libresign/crl/libresign_z9_7_n.crl#anchor',
89+
['instanceId' => 'z9', 'generation' => 7, 'engineType' => 'n'],
90+
],
8391
];
8492
}
8593

@@ -90,6 +98,8 @@ public static function invalidUrlProvider(): array {
9098
'Non numeric generation' => ['/index.php/apps/libresign/crl/libresign_abc_notanumber_o.crl'],
9199
'Engine type too long' => ['/index.php/apps/libresign/crl/libresign_abc_1_xy.crl'],
92100
'Wrong file extension' => ['/index.php/apps/libresign/crl/libresign_abc_1_o.crl.bak'],
101+
'Absolute URL without CRL path' => ['https://cloud.example.com/index.php/apps/files/'],
102+
'Absolute URL with empty path' => ['https://cloud.example.com'],
93103
];
94104
}
95105

0 commit comments

Comments
 (0)