function BlockManagerTest::testDefinitions

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

Tests definitions.

@legacy-covers ::getDefinitions

File

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

Class

BlockManagerTest
Tests Drupal\Core\Block\BlockManager.

Namespace

Drupal\Tests\Core\Block

Code

public function testDefinitions() : void {
  $definitions = $this->blockManager
    ->getDefinitions();
  $this->assertSame([
    'broken',
    'block1',
    'block2',
    'block3',
  ], array_keys($definitions));
}

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