eZ\Publish\Core\MVC\Symfony\Cache\Tests\LocalPurgeClientTest::testPurge PHP Method

testPurge() public method

public testPurge ( )
    public function testPurge()
    {
        $locationIds = array(123, 456, 789);
        $expectedBanRequest = Request::create('http://localhost', 'BAN');
        $expectedBanRequest->headers->set('X-Location-Id', '(' . implode('|', $locationIds) . ')');
        $cacheStore = $this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\Cache\\Http\\ContentPurger');
        $cacheStore->expects($this->once())->method('purgeByRequest')->with($this->equalTo($expectedBanRequest));
        $purgeClient = new LocalPurgeClient($cacheStore);
        $purgeClient->purge($locationIds);
    }
LocalPurgeClientTest