function ComponentRenderTest::checkLibraryOverrides
Same name in this branch
- 10 core/tests/Drupal/KernelTests/Components/ComponentRenderTest.php \Drupal\KernelTests\Components\ComponentRenderTest::checkLibraryOverrides()
Same name in other branches
- 11.x core/modules/sdc/tests/src/Kernel/ComponentRenderTest.php \Drupal\Tests\sdc\Kernel\ComponentRenderTest::checkLibraryOverrides()
- 11.x core/tests/Drupal/KernelTests/Components/ComponentRenderTest.php \Drupal\KernelTests\Components\ComponentRenderTest::checkLibraryOverrides()
Check using the libraryOverrides.
1 call to ComponentRenderTest::checkLibraryOverrides()
- ComponentRenderTest::testRender in core/
modules/ sdc/ tests/ src/ Kernel/ ComponentRenderTest.php - Test that components render correctly.
File
-
core/
modules/ sdc/ tests/ src/ Kernel/ ComponentRenderTest.php, line 133
Class
- ComponentRenderTest
- Tests the correct rendering of components.
Namespace
Drupal\Tests\sdc\KernelCode
protected function checkLibraryOverrides() : void {
$build = [
'#type' => 'inline_template',
'#template' => "{{ include('sdc_theme_test:lib-overrides') }}",
];
$metadata = new BubbleableMetadata();
$this->renderComponentRenderArray($build, $metadata);
$this->assertEquals([
'sdc/sdc_theme_test--lib-overrides',
], $metadata->getAttachments()['library']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.