function CategorizingPluginManagerTraitTest::testGetGroupedDefinitions

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManagerTraitTest::testGetGroupedDefinitions()
  2. 10 core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManagerTraitTest::testGetGroupedDefinitions()
  3. 9 core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManagerTraitTest::testGetGroupedDefinitions()
  4. 8.9.x core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManagerTraitTest::testGetGroupedDefinitions()

Tests get grouped definitions.

File

core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php, line 77

Class

CategorizingPluginManagerTraitTest
Tests Drupal\Core\Plugin\CategorizingPluginManagerTrait.

Namespace

Drupal\Tests\Core\Plugin

Code

public function testGetGroupedDefinitions() : void {
  $grouped = $this->pluginManager
    ->getGroupedDefinitions();
  $this->assertSame([
    'fruits',
    'vegetables',
  ], array_keys($grouped));
  $this->assertSame([
    'apple',
    'mango',
  ], array_keys($grouped['fruits']));
  $this->assertSame([
    'cucumber',
  ], array_keys($grouped['vegetables']));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.