/** * @covers ::save * * @expectedException \Exception * @expectedExceptionMessage Page variant doesn't use a Panels display variant */ public function testSaveNotPanels() { $this->storage->load('not_a_panel')->willReturn($this->pageVariantNotPanels->reveal()); $this->panelsDisplay->setConfiguration(Argument::cetera())->shouldNotBeCalled(); $this->pageVariant->save()->shouldNotBeCalled(); $panels_display = $this->prophesize(PanelsDisplayVariant::class); $panels_display->getStorageId()->willReturn('not_a_panel'); $panels_display->getConfiguration()->shouldNotBeCalled(); $panels_storage = new PageManagerPanelsStorage([], '', [], $this->entityTypeManager->reveal()); $panels_storage->save($panels_display->reveal()); }