You are here

protected function PanelizerFieldPanelsStorageTest::setUp in Panelizer 8.4

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

Overrides UnitTestCase::setUp

File

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

Class

PanelizerFieldPanelsStorageTest
Tests the PanelizerFieldPanelsStorage service.

Namespace

Drupal\Tests\panelizer\Unit

Code

protected function setUp() {
  parent::setUp();
  $this->storage = $this
    ->prophesize(EntityStorageInterface::class);
  $this->entityTypeManager = $this
    ->prophesize(EntityTypeManagerInterface::class);
  $this->entityTypeManager
    ->getStorage('entity_type_id')
    ->willReturn($this->storage
    ->reveal());
  $this->panelizer = $this
    ->prophesize(Panelizer::class);
  $this->panelsStorage = $this
    ->getMockBuilder(PanelizerFieldPanelsStorage::class)
    ->setConstructorArgs([
    [],
    '',
    [],
    $this->entityTypeManager
      ->reveal(),
    $this->panelizer
      ->reveal(),
  ])
    ->setMethods([
    'getEntityContext',
  ])
    ->getMock();
}