@@ -25,22 +25,22 @@ class VarnishPurgerTest extends \PHPUnit_Framework_TestCase
25
25
public function testPurge ()
26
26
{
27
27
$ clientProphecy1 = $ this ->prophesize (ClientInterface::class);
28
- $ clientProphecy1 ->requestAsync ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '(^|\,)/foo($|\,) ' ]])->willReturn (new Response ())->shouldBeCalled ();
29
- $ clientProphecy1 ->requestAsync ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '((^|\,)/foo($|\,))|((^|\,)/bar($|\,)) ' ]])->willReturn (new Response ())->shouldBeCalled ();
28
+ $ clientProphecy1 ->request ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '(^|\,)/foo($|\,) ' ]])->willReturn (new Response ())->shouldBeCalled ();
29
+ $ clientProphecy1 ->request ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '((^|\,)/foo($|\,))|((^|\,)/bar($|\,)) ' ]])->willReturn (new Response ())->shouldBeCalled ();
30
30
31
31
$ clientProphecy2 = $ this ->prophesize (ClientInterface::class);
32
- $ clientProphecy2 ->requestAsync ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '(^|\,)/foo($|\,) ' ]])->willReturn (new Response ())->shouldBeCalled ();
33
- $ clientProphecy2 ->requestAsync ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '((^|\,)/foo($|\,))|((^|\,)/bar($|\,)) ' ]])->willReturn (new Response ())->shouldBeCalled ();
32
+ $ clientProphecy2 ->request ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '(^|\,)/foo($|\,) ' ]])->willReturn (new Response ())->shouldBeCalled ();
33
+ $ clientProphecy2 ->request ('BAN ' , '' , ['headers ' => ['ApiPlatform-Ban-Regex ' => '((^|\,)/foo($|\,))|((^|\,)/bar($|\,)) ' ]])->willReturn (new Response ())->shouldBeCalled ();
34
34
35
35
$ purger = new VarnishPurger ([$ clientProphecy1 ->reveal (), $ clientProphecy2 ->reveal ()]);
36
36
$ purger ->purge (['/foo ' ]);
37
- $ purger ->purge (['/foo ' , '/bar ' ]);
37
+ $ purger ->purge (['/foo ' => ' /foo ' , ' /bar ' => '/bar ' ]);
38
38
}
39
39
40
40
public function testEmptyTags ()
41
41
{
42
42
$ clientProphecy1 = $ this ->prophesize (ClientInterface::class);
43
- $ clientProphecy1 ->requestAsync ()->shouldNotBeCalled ();
43
+ $ clientProphecy1 ->request ()->shouldNotBeCalled ();
44
44
45
45
$ purger = new VarnishPurger ([$ clientProphecy1 ->reveal ()]);
46
46
$ purger ->purge ([]);
0 commit comments