setLocationsToClear() public method

Replaces the list of locations to clear.
public setLocationsToClear ( array $locationsToClear )
$locationsToClear array
 public function setLocationsToClear()
 {
     $contentInfo = new ContentInfo();
     $event = new ContentCacheClearEvent($contentInfo);
     $initialLocations = [new Location(), new Location()];
     $event->addLocationToClear($initialLocations[0]);
     $event->addLocationToClear($initialLocations[1]);
     $this->assertSame($initialLocations, $event->getLocationsToClear());
     $otherLocations = [new Location(), new Location()];
     $event->setLocationsToClear($otherLocations);
     $this->assertSame($otherLocations, $event->getLocationsToClear());
 }