public function BlockManagerTest::testGroupedDefinitions in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php \Drupal\Tests\Core\Block\BlockManagerTest::testGroupedDefinitions()
- 10 core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php \Drupal\Tests\Core\Block\BlockManagerTest::testGroupedDefinitions()
@covers ::getGroupedDefinitions
File
- core/
tests/ Drupal/ Tests/ Core/ Block/ BlockManagerTest.php, line 101
Class
- BlockManagerTest
- @coversDefaultClass \Drupal\Core\Block\BlockManager
Namespace
Drupal\Tests\Core\BlockCode
public function testGroupedDefinitions() {
$definitions = $this->blockManager
->getGroupedDefinitions();
$this
->assertSame([
'Group 1',
'Group 2',
], array_keys($definitions));
$this
->assertSame([
'block2',
], array_keys($definitions['Group 1']));
$this
->assertSame([
'block3',
'block1',
], array_keys($definitions['Group 2']));
}