1 | <?php |
||
10 | class SetCookieTest extends PHPUnit_Framework_TestCase |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @covers Fracture\Http\Headers\SetCookie::__construct |
||
15 | * @covers Fracture\Http\Headers\SetCookie::isFinal |
||
16 | */ |
||
17 | public function testIsFinalResponse() |
||
22 | |||
23 | |||
24 | /** |
||
25 | * @covers Fracture\Http\Headers\SetCookie::__construct |
||
26 | * @covers Fracture\Http\Headers\SetCookie::getName |
||
27 | */ |
||
28 | public function testHeaderName() |
||
33 | |||
34 | /** |
||
35 | * @covers Fracture\Http\Headers\SetCookie::prepare |
||
36 | * @covers Fracture\Http\Headers\SetCookie::hasInvalidOptions |
||
37 | * |
||
38 | * @expectedException PHPUnit_Framework_Error_Warning |
||
39 | */ |
||
40 | public function testInvalidOptions() |
||
45 | |||
46 | |||
47 | /** |
||
48 | * @covers Fracture\Http\Headers\SetCookie::__construct |
||
49 | * @covers Fracture\Http\Headers\SetCookie::prepare |
||
50 | * @covers Fracture\Http\Headers\SetCookie::getValue |
||
51 | * |
||
52 | * @covers Fracture\Http\Headers\SetCookie::hasInvalidOptions |
||
53 | * @covers Fracture\Http\Headers\SetCookie::cleanOptions |
||
54 | * @covers Fracture\Http\Headers\SetCookie::hasInvalidOptions |
||
55 | * @covers Fracture\Http\Headers\SetCookie::collectFormatedOptions |
||
56 | * @covers Fracture\Http\Headers\SetCookie::collectExpireTime |
||
57 | * @covers Fracture\Http\Headers\SetCookie::collectDomainPathValue |
||
58 | * @covers Fracture\Http\Headers\SetCookie::collectBooleanOptions |
||
59 | * |
||
60 | * @dataProvider provideHeaderValue |
||
61 | */ |
||
62 | public function testHeaderValue($options, $expected) |
||
69 | |||
70 | |||
71 | public function provideHeaderValue() |
||
116 | |||
117 | |||
118 | /** |
||
119 | * @covers Fracture\Http\Headers\SetCookie::__construct |
||
120 | * @covers Fracture\Http\Headers\SetCookie::prepare |
||
121 | * @covers Fracture\Http\Headers\SetCookie::getValue |
||
122 | * |
||
123 | * @covers Fracture\Http\Headers\SetCookie::collectExpireTime |
||
124 | * @covers Fracture\Http\Headers\SetCookie::isDateTime |
||
125 | * @covers Fracture\Http\Headers\SetCookie::convertTime |
||
126 | * |
||
127 | * @dataProvider provideHeaderExpireValues |
||
128 | */ |
||
129 | public function testHeaderExpireValue($options, $expected) |
||
136 | |||
137 | |||
138 | public function provideHeaderExpireValues() |
||
155 | |||
156 | /** |
||
157 | * @covers Fracture\Http\Headers\SetCookie::prepare |
||
158 | * @covers Fracture\Http\Headers\SetCookie::isDateTime |
||
159 | * @covers Fracture\Http\Headers\SetCookie::convertTime |
||
160 | * |
||
161 | * @dataProvider provideeaderExpireValueAsDateTime |
||
162 | */ |
||
163 | public function testHeaderExpireValueAsDateTime($string, $expected) |
||
172 | |||
173 | |||
174 | public function provideeaderExpireValueAsDateTime() |
||
191 | } |
||
192 |