Skip to content

Commit ca67713

Browse files
committed
adjust isTopLevelHtmlNavigation tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 08a4855 commit ca67713

1 file changed

Lines changed: 5 additions & 35 deletions

File tree

tests/unit/Service/RequestClassificationServiceTest.php

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -28,58 +28,28 @@ public function testIsTopLevelHtmlNavigation(string $method, array $headers, boo
2828

2929
public static function topLevelHtmlNavigationProvider(): array {
3030
return [
31-
'top level navigation with html accept' => [
31+
'top level navigation' => [
3232
'GET',
33-
[
34-
'Accept' => 'text/html,application/xhtml+xml',
35-
'Sec-Fetch-Mode' => 'navigate',
36-
'Sec-Fetch-Dest' => 'document',
37-
],
38-
true,
39-
],
40-
'html accept without fetch metadata' => [
41-
'GET',
42-
[
43-
'Accept' => 'text/html',
44-
],
33+
[],
4534
true,
4635
],
4736
'xhr request' => [
4837
'GET',
4938
[
50-
'Accept' => 'text/html',
5139
'X-Requested-With' => 'XMLHttpRequest',
5240
],
5341
false,
5442
],
55-
'json request' => [
43+
'ocs api request' => [
5644
'GET',
5745
[
58-
'Accept' => 'application/json',
59-
],
60-
false,
61-
],
62-
'non navigate fetch mode' => [
63-
'GET',
64-
[
65-
'Accept' => 'text/html',
66-
'Sec-Fetch-Mode' => 'cors',
67-
],
68-
false,
69-
],
70-
'non document destination' => [
71-
'GET',
72-
[
73-
'Accept' => 'text/html',
74-
'Sec-Fetch-Dest' => 'empty',
46+
'OCS-apirequest' => 'true',
7547
],
7648
false,
7749
],
7850
'non get request' => [
7951
'POST',
80-
[
81-
'Accept' => 'text/html',
82-
],
52+
[],
8353
false,
8454
],
8555
];

0 commit comments

Comments
 (0)