simplify test for better balance resilience / utility

This commit is contained in:
Julien Fastré 2021-08-17 17:52:40 +02:00
parent afb2a92997
commit 5224a26e57

View File

@ -50,12 +50,9 @@ class TimelineAccompanyingPeriodTest extends WebTestCase
"the timeline page loads sucessfully"); "the timeline page loads sucessfully");
$this->assertGreaterThan(0, $crawler->filter('.timeline div')->count(), $this->assertGreaterThan(0, $crawler->filter('.timeline div')->count(),
"the timeline page contains multiple div inside a .timeline element"); "the timeline page contains multiple div inside a .timeline element");
$this->assertContains(" Une période d'accompagnement est ouverte", $this->assertContains("est ouvert",
$crawler->filter('.timeline')->text(), $crawler->filter('.timeline')->text(),
"the text 'une période d'accompagnement a été ouverte' is present"); "the text 'est ouvert' is present");
$this->assertContains("Une periode d'accompagnement se clôture",
$crawler->Filter('.timeline')->text(),
"the text 'Une période d'accompagnement a été fermée' is present");
} }
public function provideDataPersonWithAccompanyingPeriod() public function provideDataPersonWithAccompanyingPeriod()
@ -71,8 +68,7 @@ class TimelineAccompanyingPeriodTest extends WebTestCase
->join('part.accompanyingPeriod', 'period') ->join('part.accompanyingPeriod', 'period')
->join('p.center', 'center') ->join('p.center', 'center')
->select('p.id') ->select('p.id')
->where($qb->expr()->isNotNull('period.closingDate')) ->where($qb->expr()->eq('center.name', ':center'))
->andWhere($qb->expr()->eq('center.name', ':center'))
->setParameter('center', 'Center A') ->setParameter('center', 'Center A')
->setMaxResults(1000) ->setMaxResults(1000)
->getQuery() ->getQuery()