@@ 26-35 (lines=10) @@ | ||
23 | $this->assertEquals($date, $modifiedSince->getValue()); |
|
24 | } |
|
25 | ||
26 | public function testGetBadValue() |
|
27 | { |
|
28 | $stack = new RequestStack(); |
|
29 | $request = new Request(); |
|
30 | $request->headers->set('If-Modified-Since', 'something that is not a date'); |
|
31 | $stack->push($request); |
|
32 | ||
33 | $modifiedSince = new ModifiedSince($stack, new NullLogger()); |
|
34 | $this->assertInstanceOf('\DateTime', $modifiedSince->getValue()); |
|
35 | } |
|
36 | ||
37 | public function testGetEmptyArrayValue() |
|
38 | { |
|
@@ 37-46 (lines=10) @@ | ||
34 | $this->assertInstanceOf('\DateTime', $modifiedSince->getValue()); |
|
35 | } |
|
36 | ||
37 | public function testGetEmptyArrayValue() |
|
38 | { |
|
39 | $stack = new RequestStack(); |
|
40 | $request = new Request(); |
|
41 | $request->headers->set('If-Modified-Since', array()); |
|
42 | $stack->push($request); |
|
43 | ||
44 | $modifiedSince = new ModifiedSince($stack, new NullLogger()); |
|
45 | $this->assertInstanceOf('\DateTime', $modifiedSince->getValue()); |
|
46 | } |
|
47 | ||
48 | ||
49 | public function testGetValueInArray() |