public function LayoutPluginManagerTest::testGetThemeImplementations in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php \Drupal\Tests\Core\Layout\LayoutPluginManagerTest::testGetThemeImplementations()
- 9 core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php \Drupal\Tests\Core\Layout\LayoutPluginManagerTest::testGetThemeImplementations()
@covers ::getThemeImplementations
File
- core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutPluginManagerTest.php, line 226
Class
- LayoutPluginManagerTest
- @coversDefaultClass \Drupal\Core\Layout\LayoutPluginManager @group Layout
Namespace
Drupal\Tests\Core\LayoutCode
public function testGetThemeImplementations() {
$core_path = '/core/lib/Drupal/Core';
$expected = [
'layout' => [
'render element' => 'content',
],
'twocol' => [
'render element' => 'content',
'base hook' => 'layout',
'template' => 'twocol',
'path' => 'themes/theme_a/templates',
],
'plugin_provided_layout' => [
'render element' => 'content',
'base hook' => 'layout',
'template' => 'plugin-provided-layout',
'path' => "{$core_path}/templates",
],
];
$theme_implementations = $this->layoutPluginManager
->getThemeImplementations();
$this
->assertEquals($expected, $theme_implementations);
}