function IconBuilderTest::testBuild
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php \Drupal\KernelTests\Core\Layout\IconBuilderTest::testBuild()
- 10 core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php \Drupal\KernelTests\Core\Layout\IconBuilderTest::testBuild()
- 9 core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php \Drupal\KernelTests\Core\Layout\IconBuilderTest::testBuild()
- 8.9.x core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php \Drupal\KernelTests\Core\Layout\IconBuilderTest::testBuild()
Tests build.
@legacy-covers ::build @legacy-covers ::buildRenderArray @legacy-covers ::calculateSvgValues @legacy-covers ::getLength @legacy-covers ::getOffset
Attributes
#[DataProvider('providerTestBuild')]
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Layout/ IconBuilderTest.php, line 32
Class
Namespace
Drupal\KernelTests\Core\LayoutCode
public function testBuild(SvgIconBuilder $icon_builder, $icon_map, $expected) : void {
$renderer = $this->container
->get('renderer');
$build = $icon_builder->build($icon_map);
$output = (string) $renderer->executeInRenderContext(new RenderContext(), function () use ($build, $renderer) {
return $renderer->render($build);
});
$this->assertSame($expected, $output);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.