You are here

public function PluginTypeManagerTest::providerHasPluginType in Plugin 8.2

Provides data to self::testHasPluginType().

File

tests/src/Unit/PluginType/PluginTypeManagerTest.php, line 185

Class

PluginTypeManagerTest
@coversDefaultClass \Drupal\plugin\PluginType\PluginTypeManager

Namespace

Drupal\Tests\plugin\Unit\PluginType

Code

public function providerHasPluginType() {
  $data = [];

  // This hardcoded the IDs in $this->pluginTypeDefinitions.
  foreach ([
    'foo',
    'bar',
  ] as $key) {
    $data[] = [
      TRUE,
      $key,
      $key,
      TRUE,
    ];
    $data[] = [
      FALSE,
      $key,
      $key,
      FALSE,
    ];
  }
  $data[] = [
    FALSE,
    $this
      ->randomMachineName(),
    $this
      ->randomMachineName(),
    TRUE,
  ];
  $data[] = [
    FALSE,
    $this
      ->randomMachineName(),
    $this
      ->randomMachineName(),
    FALSE,
  ];
  return $data;
}