function BlockManagerTest::testSortedDefinitions

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

@covers ::getSortedDefinitions

File

core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php, line 97

Class

BlockManagerTest
@coversDefaultClass \Drupal\Core\Block\BlockManager

Namespace

Drupal\Tests\Core\Block

Code

public function testSortedDefinitions() {
    $definitions = $this->blockManager
        ->getSortedDefinitions();
    $this->assertSame([
        'block2',
        'block3',
        'block1',
    ], array_keys($definitions));
}

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