fix showing flash messages

This commit is contained in:
Julien Fastré 2021-07-22 16:56:12 +02:00
parent 76e7f5b1ee
commit cacc82bec8
3 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@
<div class="row justify-content-center">
{# Flash messages ! #}
{% if app.session.flashbag.all()|length > 0 %}
{% if app.session.flashbag.keys()|length > 0 %}
<div class="col-8 mt-5 flash_message">
{% for flashMessage in app.session.flashbag.get('success') %}

View File

@ -29,7 +29,7 @@
<div class="col-md-9">
{# Flash messages ! #}
{% if app.session.flashbag.all()|length > 0 %}
{% if app.session.flashbag.keys()|length > 0 %}
<div class="row justify-content-center mt-5">
{% for flashMessage in app.session.flashbag.get('success') %}

View File

@ -190,7 +190,7 @@ var_dump($crawler->text());
'the value '.$field.' is updated in db');
$crawler = $this->client->followRedirect();
$this->assertGreaterThan(0, $crawler->filter('.success')->count(),
$this->assertGreaterThan(0, $crawler->filter('.alert-success')->count(),
'a element .success is shown');
if($field == 'birthdate' or $field == 'memo' or $field == 'countryOfBirth' or $field == 'nationality'
@ -245,7 +245,7 @@ var_dump($crawler->text());
$this->assertFalse($this->client->getResponse()->isRedirect(),
'the page is not redirected to /general');
$this->assertGreaterThan(0, $crawler->filter('.error')->count(),
$this->assertGreaterThan(0, $crawler->filter('.alert-danger')->count(),
'a element .error is shown');
}