Browse Source

Fix broken tests

merge-requests/14/head
Chi 3 years ago
parent
commit
4037c5f7cf
  1. 15
      tests/src/Kernel/BlockViewBuilderTest.php

15
tests/src/Kernel/BlockViewBuilderTest.php

@ -54,8 +54,8 @@ final class BlockViewBuilderTest extends KernelTestBase {
'#configuration' => [ '#configuration' => [
'id' => 'twig_tweak_test_foo', 'id' => 'twig_tweak_test_foo',
'label' => '', 'label' => '',
'provider' => 'twig_tweak_test',
'label_display' => 'visible', 'label_display' => 'visible',
'provider' => 'twig_tweak_test',
'content' => 'Foo', 'content' => 'Foo',
], ],
'#plugin_id' => 'twig_tweak_test_foo', '#plugin_id' => 'twig_tweak_test_foo',
@ -73,6 +73,19 @@ final class BlockViewBuilderTest extends KernelTestBase {
], ],
], ],
]; ];
// @todo Remove this once we drop support for Drupal 9.2.
// @see https://www.drupal.org/node/3230199
if (\version_compare(\Drupal::VERSION, '9.3.0-dev', '<')) {
$expected_build['#configuration'] = [
'id' => 'twig_tweak_test_foo',
'label' => '',
'provider' => 'twig_tweak_test',
'label_display' => 'visible',
'content' => 'Foo',
];
}
self::assertSame($expected_build, $build); self::assertSame($expected_build, $build);
self::assertSame('<div id="foo">Foo</div>', $this->renderPlain($build)); self::assertSame('<div id="foo">Foo</div>', $this->renderPlain($build));

Loading…
Cancel
Save