You are here

public function PanelizerFieldPanelsStorageTest::testLoadNotFound in Panelizer 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/PanelizerFieldPanelsStorageTest.php \Drupal\Tests\panelizer\Unit\PanelizerFieldPanelsStorageTest::testLoadNotFound()
  2. 8.3 tests/src/Unit/PanelizerFieldPanelsStorageTest.php \Drupal\Tests\panelizer\Unit\PanelizerFieldPanelsStorageTest::testLoadNotFound()

@covers ::load

File

tests/src/Unit/PanelizerFieldPanelsStorageTest.php, line 135

Class

PanelizerFieldPanelsStorageTest
Tests the PanelizerFieldPanelsStorage service.

Namespace

Drupal\Tests\panelizer\Unit

Code

public function testLoadNotFound() {
  $entity = $this
    ->prophesize(FieldableEntityInterface::class);
  $this->storage
    ->load('123')
    ->willReturn($entity
    ->reveal());
  $this->panelizer
    ->getPanelsDisplay($entity
    ->reveal(), 'view_mode')
    ->willReturn(NULL);
  $this
    ->assertSame(NULL, $this->panelsStorage
    ->load('entity_type_id:123:view_mode'));
}