You are here

public function PanelsDisplayVariantTest::setUp in Panels 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/PanelsDisplayVariantTest.php \Drupal\Tests\panels\Unit\PanelsDisplayVariantTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/PanelsDisplayVariantTest.php, line 82

Class

PanelsDisplayVariantTest
@coversDefaultClass \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant @group Panels

Namespace

Drupal\Tests\panels\Unit

Code

public function setUp() {
  $this->account = $this
    ->prophesize(AccountInterface::class);
  $this->contextHandler = $this
    ->prophesize(ContextHandlerInterface::class);
  $this->uuidGenerator = $this
    ->prophesize(UuidInterface::class);
  $this->token = $this
    ->prophesize(Token::class);
  $this->blockManager = $this
    ->prophesize(BlockManager::class);
  $this->conditionManager = $this
    ->prophesize(ConditionManager::class);
  $this->moduleHandler = $this
    ->prophesize(ModuleHandlerInterface::class);
  $this->builderManager = $this
    ->prophesize(DisplayBuilderManagerInterface::class);
  $this->layoutManager = $this
    ->prophesize(LayoutPluginManagerInterface::class);
  $this->layout = $this
    ->prophesize(LayoutInterface::class);
  $this->layoutManager
    ->createInstance(Argument::type('string'), Argument::type('array'))
    ->willReturn($this->layout
    ->reveal());
  $this->variant = new PanelsDisplayVariant([], '', [], $this->contextHandler
    ->reveal(), $this->account
    ->reveal(), $this->uuidGenerator
    ->reveal(), $this->token
    ->reveal(), $this->blockManager
    ->reveal(), $this->conditionManager
    ->reveal(), $this->moduleHandler
    ->reveal(), $this->builderManager
    ->reveal(), $this->layoutManager
    ->reveal());
}