diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index 3c418aa64..938b1d1ca 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,9 +1,8 @@ twig: - default_path: '%kernel.project_dir%/templates' + file_name_pattern: '*.twig' form_themes: - - 'form/layout.html.twig' + - 'bootstrap_5_layout.html.twig' - 'form/fields.html.twig' - file_name_pattern: '*.twig' when@test: twig: diff --git a/templates/form/layout.html.twig b/templates/form/layout.html.twig deleted file mode 100644 index c51b973d8..000000000 --- a/templates/form/layout.html.twig +++ /dev/null @@ -1,16 +0,0 @@ -{% extends 'bootstrap_4_layout.html.twig' %} - -{# Errors #} - -{# {% block form_errors -%} - {% if errors|length > 0 -%} - {% if form is not rootform %}{% else %}
{% endif %} - - {% if form is not rootform %}{% else %}
{% endif %} - {%- endif %} -{%- endblock form_errors %} #} diff --git a/tests/Controller/Admin/BlogControllerTest.php b/tests/Controller/Admin/BlogControllerTest.php index 01649b75a..d7a2c39cc 100644 --- a/tests/Controller/Admin/BlogControllerTest.php +++ b/tests/Controller/Admin/BlogControllerTest.php @@ -133,8 +133,11 @@ public function testAdminNewDuplicatedPost(): void // post titles must be unique, so trying to create the same post twice should result in an error $this->client->submit($form); - $this->assertSelectorTextContains('form .invalid-feedback .form-error-message', 'This title was already used in another blog post, but they must be unique.'); $this->assertSelectorExists('form #post_title.is-invalid'); + $this->assertSelectorTextContains( + 'form .invalid-feedback', + 'This title was already used in another blog post, but they must be unique.' + ); } public function testAdminShowPost(): void