You are here

protected function ArrayPluginDefinitionDecoratorTest::setUp in Plugin 8.2

Overrides UnitTestCase::setUp

File

tests/src/Unit/PluginDefinition/ArrayPluginDefinitionDecoratorTest.php, line 37

Class

ArrayPluginDefinitionDecoratorTest
@coversDefaultClass \Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator

Namespace

Drupal\Tests\plugin\Unit\PluginDefinition

Code

protected function setUp() : void {
  parent::setUp();
  $this->arrayDefinition = [
    'id' => $this
      ->randomMachineName(),
    'label' => $this
      ->randomMachineName(),
    'description' => $this
      ->randomMachineName(),
    'class' => $this
      ->getMockClass(DeriverInterface::class),
    'category' => $this
      ->randomMachineName(),
    'provider' => $this
      ->randomMachineName(),
    'deriver' => $this
      ->getMockClass(DeriverInterface::class),
    'operations_provider' => $this
      ->getMockClass(PluginOperationsProviderInterface::class),
    'context' => [
      $this
        ->randomMachineName() => $this
        ->createMock(ContextDefinitionInterface::class),
    ],
    'config_dependencies' => [
      'module' => [
        $this
          ->randomMachineName(),
      ],
    ],
    'parent_id' => $this
      ->randomMachineName(),
  ];
  $this->sut = new ArrayPluginDefinitionDecorator($this->arrayDefinition);
}