You are here

public function PluginDefinitionValidatorTest::providerValidateContextDefinitions in Plugin 8.2

Provides data to self::testValidateContextDefinitions().

File

tests/src/Unit/PluginDefinition/PluginDefinitionValidatorTest.php, line 98

Class

PluginDefinitionValidatorTest
@coversDefaultClass \Drupal\plugin\PluginDefinition\PluginDefinitionValidator

Namespace

Drupal\Tests\plugin\Unit\PluginDefinition

Code

public function providerValidateContextDefinitions() {
  return [
    [
      TRUE,
      [],
    ],
    [
      TRUE,
      [
        $this
          ->createMock(ContextDefinitionInterface::class),
      ],
    ],
    [
      FALSE,
      [
        $this
          ->getMockClass(ContextDefinitionInterface::class),
      ],
    ],
    [
      FALSE,
      [
        $this
          ->randomMachineName(),
      ],
    ],
    [
      FALSE,
      [
        ContextDefinitionInterface::class,
      ],
    ],
  ];
}