private static function RegionViewBuilderTest::normalizeHtml in Twig Tweak 3.1.x
Same name and namespace in other branches
- 3.x tests/src/Kernel/RegionViewBuilderTest.php \Drupal\Tests\twig_tweak\Kernel\RegionViewBuilderTest::normalizeHtml()
Normalizes the provided HTML.
1 call to RegionViewBuilderTest::normalizeHtml()
- RegionViewBuilderTest::testRegionViewBuilder in tests/
src/ Kernel/ RegionViewBuilderTest.php - Test callback.
File
- tests/
src/ Kernel/ RegionViewBuilderTest.php, line 149
Class
- RegionViewBuilderTest
- A test for RegionViewBuilder.
Namespace
Drupal\Tests\twig_tweak\KernelCode
private static function normalizeHtml(string $html) : string {
return rtrim(preg_replace([
'#\\s{2,}#',
'#\\n#',
], '', $html));
}