1 | <?php |
||
13 | class NoCacheWebPathResolverTest extends AbstractTest |
||
14 | { |
||
15 | public function testCouldBeConstructedWithRequestContextAsArgument() |
||
16 | { |
||
17 | new NoCacheWebPathResolver(new RequestContext()); |
||
18 | } |
||
19 | |||
20 | public function testComposeSchemaHostAndPathOnResolve() |
||
21 | { |
||
22 | $context = new RequestContext('', 'GET', 'thehost', 'theSchema'); |
||
23 | |||
24 | $resolver = new NoCacheWebPathResolver($context); |
||
25 | |||
26 | $this->assertEquals('theschema://thehost/aPath', $resolver->resolve('aPath', 'aFilter')); |
||
27 | } |
||
28 | |||
29 | public function testDoNothingOnStore() |
||
30 | { |
||
31 | $resolver = new NoCacheWebPathResolver(new RequestContext()); |
||
32 | |||
33 | $this->assertNull($resolver->store( |
||
34 | new Binary('aContent', 'image/jpeg', 'jpg'), |
||
35 | 'a/path', |
||
36 | 'aFilter' |
||
37 | )); |
||
38 | } |
||
39 | |||
40 | public function testDoNothingForPathAndFilterOnRemove() |
||
41 | { |
||
42 | $resolver = new NoCacheWebPathResolver(new RequestContext()); |
||
43 | |||
44 | $resolver->remove(array('a/path'), array('aFilter')); |
||
45 | } |
||
46 | |||
47 | public function testDoNothingForSomePathsAndSomeFiltersOnRemove() |
||
48 | { |
||
49 | $resolver = new NoCacheWebPathResolver(new RequestContext()); |
||
50 | |||
51 | $resolver->remove(array('foo', 'bar'), array('foo', 'bar')); |
||
52 | } |
||
53 | |||
54 | public function testDoNothingForEmptyPathAndEmptyFilterOnRemove() |
||
55 | { |
||
56 | $resolver = new NoCacheWebPathResolver(new RequestContext()); |
||
57 | |||
58 | $resolver->remove(array(), array()); |
||
59 | } |
||
60 | } |
||
61 |