fix redirection after creating accompanying course in test

This commit is contained in:
Julien Fastré 2021-05-31 21:31:02 +02:00
parent 1410213258
commit f49c54d51f

View File

@ -28,7 +28,7 @@ class AccompanyingCourseControllerTest extends WebTestCase
$this->assertResponseRedirects();
$location = $this->client->getResponse()->headers->get('Location');
$this->assertEquals(1, \preg_match("|^\/[^\/]+\/parcours/([\d]+)/show$|", $location));
$this->assertEquals(1, \preg_match("|^\/[^\/]+\/parcours/([\d]+)/edit$|", $location));
}
@ -48,7 +48,7 @@ class AccompanyingCourseControllerTest extends WebTestCase
$location = $this->client->getResponse()->headers->get('Location');
$matches = [];
$this->assertEquals(1, \preg_match("|^\/[^\/]+\/parcours/([\d]+)/show$|", $location, $matches));
$this->assertEquals(1, \preg_match("|^\/[^\/]+\/parcours/([\d]+)/edit$|", $location, $matches));
$id = $matches[1];
$period = self::$container->get(EntityManagerInterface::class)