@@ -19,11 +19,11 @@ class TagHandlerTest extends \PHPUnit_Framework_TestCase
19
19
public function testInvalidateTags ()
20
20
{
21
21
$ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
22
- ->shouldReceive ('invalidate ' )
23
- ->with (['X-Cache-Tags ' => ' (post\-1| posts)(,.+)?$ ' ] )
22
+ ->shouldReceive ('invalidateTags ' )
23
+ ->with (['post-1 ' , ' posts ' ], ' X-Cache-Tags ' )
24
24
->once ()
25
25
->shouldReceive ('supports ' )
26
- ->with (CacheInvalidator::INVALIDATE )
26
+ ->with (CacheInvalidator::TAGS )
27
27
->once ()
28
28
->andReturn (true )
29
29
->getMock ();
@@ -35,11 +35,11 @@ public function testInvalidateTags()
35
35
public function testInvalidateTagsCustomHeader ()
36
36
{
37
37
$ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
38
- ->shouldReceive ('invalidate ' )
39
- ->with (['Custom-Tags ' => ' (post\-1)(,.+)?$ ' ] )
38
+ ->shouldReceive ('invalidateTags ' )
39
+ ->with (['post-1 ' ], ' Custom-Tags ' )
40
40
->once ()
41
41
->shouldReceive ('supports ' )
42
- ->with (CacheInvalidator::INVALIDATE )
42
+ ->with (CacheInvalidator::TAGS )
43
43
->once ()
44
44
->andReturn (true )
45
45
->getMock ();
@@ -52,11 +52,11 @@ public function testInvalidateTagsCustomHeader()
52
52
public function testEscapingTags ()
53
53
{
54
54
$ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
55
- ->shouldReceive ('invalidate ' )
56
- ->with (['X-Cache-Tags ' => ' (post_test)(,.+)?$ ' ] )
55
+ ->shouldReceive ('invalidateTags ' )
56
+ ->with (['post_test ' ], ' X-Cache-Tags ' )
57
57
->once ()
58
58
->shouldReceive ('supports ' )
59
- ->with (CacheInvalidator::INVALIDATE )
59
+ ->with (CacheInvalidator::TAGS )
60
60
->once ()
61
61
->andReturn (true )
62
62
->getMock ();
@@ -72,7 +72,7 @@ public function testInvalidateUnsupported()
72
72
{
73
73
$ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
74
74
->shouldReceive ('supports ' )
75
- ->with (CacheInvalidator::INVALIDATE )
75
+ ->with (CacheInvalidator::TAGS )
76
76
->once ()
77
77
->andReturn (false )
78
78
->getMock ();
@@ -84,7 +84,7 @@ public function testTagResponse()
84
84
{
85
85
$ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
86
86
->shouldReceive ('supports ' )
87
- ->with (CacheInvalidator::INVALIDATE )
87
+ ->with (CacheInvalidator::TAGS )
88
88
->once ()
89
89
->andReturn (true )
90
90
->getMock ();
0 commit comments