eZ\Publish\Core\MVC\Symfony\Cache\Tests\Http\EventListener\AssignedLocationsListenerTest::testOnContentCacheClear PHP Method

testOnContentCacheClear() public method

    public function testOnContentCacheClear()
    {
        $contentId = 123;
        $contentInfo = new ContentInfo(['id' => $contentId]);
        $event = new ContentCacheClearEvent($contentInfo);
        $locations = [new Location(), new Location(), new Location(), new Location()];
        $this->locationService->expects($this->once())->method('loadLocations')->with($contentInfo)->will($this->returnValue($locations));
        $this->listener->onContentCacheClear($event);
        $this->assertSame($locations, $event->getLocationsToClear());
    }