public function testGetValidBlockItems()
{
$block = $this->buildBlock();
$items = array(new Item(), new Item());
$this->storageGateway->expects($this->once())->method('getValidBlockItems')->with($block)->will($this->returnValue($items));
$this->pageService->setStorageGateway($this->storageGateway);
// Calling assertion twice to test cache (comes along with storage gateway's getValidBlockItems() that should be called only once. See above)
$this->assertSame($items, $this->pageService->getValidBlockItems($block));
$this->assertSame($items, $this->pageService->getValidBlockItems($block));
}