public function PanelsStorageTest::testSaveDoesntExist in Panels 8.3
Same name and namespace in other branches
- 8.4 tests/src/Unit/PanelsStorageTest.php \Drupal\Tests\panels\Unit\PanelsStorageTest::testSaveDoesntExist()
@covers ::save
@expectedException \Exception @expectedExceptionMessage Couldn't find page variant to store Panels display
File
- tests/
src/ Unit/ PanelsStorageTest.php, line 126 - Contains \Drupal\Tests\panels\Unit\PanelsStorageTest.
Class
- PanelsStorageTest
- Tests the PageManagerPanelsStorage service.
Namespace
Drupal\Tests\panels\UnitCode
public function testSaveDoesntExist() {
$this->panelsDisplay
->setConfiguration()
->shouldNotBeCalled();
$this->pageVariant
->save()
->shouldNotBeCalled();
$this->storage
->load('doesnt_exist')
->willReturn(NULL);
$panels_display = $this
->prophesize(PanelsDisplayVariant::class);
$panels_display
->getStorageId()
->willReturn('doesnt_exist');
$panels_display
->getConfiguration()
->shouldNotBeCalled();
$panels_storage = new PageManagerPanelsStorage([], '', [], $this->entityTypeManager
->reveal());
$panels_storage
->save($panels_display
->reveal());
}