function CategorizingPluginManagerTraitTest::testGetCategories

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

@covers ::getCategories

File

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

Class

CategorizingPluginManagerTraitTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Plugin%21CategorizingPluginManagerTrait.php/trait/CategorizingPluginManagerTrait/9" title="Provides a trait for the CategorizingPluginManagerInterface." class="local">\Drupal\Core\Plugin\CategorizingPluginManagerTrait</a> @group Plugin

Namespace

Drupal\Tests\Core\Plugin

Code

public function testGetCategories() {
    $this->assertSame([
        'fruits',
        'vegetables',
    ], array_values($this->pluginManager
        ->getCategories()));
}

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