Browse Source

Issue #3359146: Wrong preg_replace in ImageViewBuilderTest removes relevant attributes

merge-requests/33/merge
Julian Pustkuchen 1 year ago committed by Ivan
parent
commit
2e11f9b7ad
  1. 2
      tests/src/Kernel/ImageViewBuilderTest.php

2
tests/src/Kernel/ImageViewBuilderTest.php

@ -174,7 +174,7 @@ final class ImageViewBuilderTest extends AbstractTestCase {
private function renderPlain(array $build): string {
$html = $this->container->get('renderer')->renderPlain($build);
$html = preg_replace('#src=".+/files/#s', 'src="/files/', $html);
$html = preg_replace('#\?itok=.+"#', '?itok=abc"', $html);
$html = preg_replace('#\?itok=.+?"#', '?itok=abc"', $html);
$html = preg_replace(['#\s{2,}#', '#\n#'], '', $html);
return rtrim($html);
}

Loading…
Cancel
Save