You are here

public function PluginTypeManagerTest::testGetPluginTypes in Plugin 8.2

Same name in this branch
  1. 8.2 tests/src/Unit/PluginType/PluginTypeManagerTest.php \Drupal\Tests\plugin\Unit\PluginType\PluginTypeManagerTest::testGetPluginTypes()
  2. 8.2 tests/src/Kernel/PluginType/PluginTypeManagerTest.php \Drupal\Tests\plugin\Kernel\PluginType\PluginTypeManagerTest::testGetPluginTypes()

@covers ::getPluginTypes

File

tests/src/Kernel/PluginType/PluginTypeManagerTest.php, line 51

Class

PluginTypeManagerTest
@coversDefaultClass \Drupal\plugin\PluginType\PluginTypeManager

Namespace

Drupal\Tests\plugin\Kernel\PluginType

Code

public function testGetPluginTypes() {

  /** @var \Drupal\plugin\PluginType\PluginTypeManager $plugin_type_manager */
  $plugin_type_manager = $this->container
    ->get('plugin.plugin_type_manager');
  $plugin_types = $plugin_type_manager
    ->getPluginTypes();
  $this
    ->assertNotEmpty($plugin_types);
  foreach ($plugin_types as $plugin_type) {
    $this
      ->assertInstanceOf(PluginTypeInterface::class, $plugin_type);
  }
}