@@ -19,11 +19,11 @@ class TagHandlerTest extends \PHPUnit_Framework_TestCase
1919 public function testInvalidateTags ()
2020 {
2121 $ 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 ' )
2424 ->once ()
2525 ->shouldReceive ('supports ' )
26- ->with (CacheInvalidator::INVALIDATE )
26+ ->with (CacheInvalidator::TAGS )
2727 ->once ()
2828 ->andReturn (true )
2929 ->getMock ();
@@ -35,11 +35,11 @@ public function testInvalidateTags()
3535 public function testInvalidateTagsCustomHeader ()
3636 {
3737 $ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
38- ->shouldReceive ('invalidate ' )
39- ->with (['Custom-Tags ' => ' (post\-1)(,.+)?$ ' ] )
38+ ->shouldReceive ('invalidateTags ' )
39+ ->with (['post-1 ' ], ' Custom-Tags ' )
4040 ->once ()
4141 ->shouldReceive ('supports ' )
42- ->with (CacheInvalidator::INVALIDATE )
42+ ->with (CacheInvalidator::TAGS )
4343 ->once ()
4444 ->andReturn (true )
4545 ->getMock ();
@@ -52,11 +52,11 @@ public function testInvalidateTagsCustomHeader()
5252 public function testEscapingTags ()
5353 {
5454 $ 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 ' )
5757 ->once ()
5858 ->shouldReceive ('supports ' )
59- ->with (CacheInvalidator::INVALIDATE )
59+ ->with (CacheInvalidator::TAGS )
6060 ->once ()
6161 ->andReturn (true )
6262 ->getMock ();
@@ -72,7 +72,7 @@ public function testInvalidateUnsupported()
7272 {
7373 $ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
7474 ->shouldReceive ('supports ' )
75- ->with (CacheInvalidator::INVALIDATE )
75+ ->with (CacheInvalidator::TAGS )
7676 ->once ()
7777 ->andReturn (false )
7878 ->getMock ();
@@ -84,7 +84,7 @@ public function testTagResponse()
8484 {
8585 $ cacheInvalidator = \Mockery::mock ('FOS\HttpCache\CacheInvalidator ' )
8686 ->shouldReceive ('supports ' )
87- ->with (CacheInvalidator::INVALIDATE )
87+ ->with (CacheInvalidator::TAGS )
8888 ->once ()
8989 ->andReturn (true )
9090 ->getMock ();
0 commit comments