function CategorizingPluginManagerTraitTest::testGetSortedDefinitions

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

@covers ::getSortedDefinitions

File

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

Class

CategorizingPluginManagerTraitTest
@coversDefaultClass \Drupal\Core\Plugin\CategorizingPluginManagerTrait @group Plugin

Namespace

Drupal\Tests\Core\Plugin

Code

public function testGetSortedDefinitions() {
    $sorted = $this->pluginManager
        ->getSortedDefinitions();
    $this->assertSame([
        'apple',
        'mango',
        'cucumber',
    ], array_keys($sorted));
}

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