ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\HTTP\FunctionsTest Class Reference
+ Inheritance diagram for Sabre\HTTP\FunctionsTest:
+ Collaboration diagram for Sabre\HTTP\FunctionsTest:

Public Member Functions

 testGetHeaderValues ($input, $output)
 getHeaderValuesData More...
 
 getHeaderValuesData ()
 
 testPrefer ($input, $output)
 preferData More...
 
 preferData ()
 

Detailed Description

Definition at line 5 of file FunctionsTest.php.

Member Function Documentation

◆ getHeaderValuesData()

Sabre\HTTP\FunctionsTest::getHeaderValuesData ( )

Definition at line 19 of file FunctionsTest.php.

19  {
20 
21  return [
22  [
23  "a",
24  ["a"]
25  ],
26  [
27  "a,b",
28  ["a", "b"]
29  ],
30  [
31  "a, b",
32  ["a", "b"]
33  ],
34  [
35  ["a, b"],
36  ["a", "b"]
37  ],
38  [
39  ["a, b", "c", "d,e"],
40  ["a", "b", "c", "d", "e"]
41  ],
42  ];
43 
44  }

◆ preferData()

Sabre\HTTP\FunctionsTest::preferData ( )

Definition at line 58 of file FunctionsTest.php.

58  {
59 
60  return [
61  [
62  'foo; bar',
63  ['foo' => true]
64  ],
65  [
66  'foo; bar=""',
67  ['foo' => true]
68  ],
69  [
70  'foo=""; bar',
71  ['foo' => true]
72  ],
73  [
74  'FOO',
75  ['foo' => true]
76  ],
77  [
78  'respond-async',
79  ['respond-async' => true]
80  ],
81  [
82 
83  ['respond-async, wait=100', 'handling=lenient'],
84  ['respond-async' => true, 'wait' => 100, 'handling' => 'lenient']
85  ],
86  [
87 
88  ['respond-async, wait=100, handling=lenient'],
89  ['respond-async' => true, 'wait' => 100, 'handling' => 'lenient']
90  ],
91  // Old values
92  [
93 
94  'return-asynch, return-representation',
95  ['respond-async' => true, 'return' => 'representation'],
96  ],
97  [
98 
99  'return-minimal',
100  ['return' => 'minimal'],
101  ],
102  [
103 
104  'strict',
105  ['handling' => 'strict'],
106  ],
107  [
108 
109  'lenient',
110  ['handling' => 'lenient'],
111  ],
112  // Invalid token
113  [
114  ['foo=%bar%'],
115  [],
116  ]
117  ];
118 
119  }

◆ testGetHeaderValues()

Sabre\HTTP\FunctionsTest::testGetHeaderValues (   $input,
  $output 
)

getHeaderValuesData

Definition at line 10 of file FunctionsTest.php.

References $input, Sabre\VObject\$output, and Sabre\HTTP\getHeaderValues().

10  {
11 
12  $this->assertEquals(
13  $output,
15  );
16 
17  }
getHeaderValues($values, $values2=null)
This method splits up headers into all their individual values.
Definition: functions.php:301
+ Here is the call graph for this function:

◆ testPrefer()

Sabre\HTTP\FunctionsTest::testPrefer (   $input,
  $output 
)

preferData

Definition at line 49 of file FunctionsTest.php.

References $input, Sabre\VObject\$output, and Sabre\HTTP\parsePrefer().

49  {
50 
51  $this->assertEquals(
52  $output,
54  );
55 
56  }
parsePrefer($input)
Parses the Prefer header, as defined in RFC7240.
Definition: functions.php:222
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: