mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
@@ -341,7 +341,7 @@ class ParticipationControllerTest extends WebTestCase
|
||||
$this->assertEquals($nbParticipations + 2, $event->getParticipations()->count());
|
||||
}
|
||||
|
||||
public function testMultipleWithAllPeopleParticipating()
|
||||
public function testNewMultipleWithAllPeopleParticipating()
|
||||
{
|
||||
$event = $this->getRandomEventWithMultipleParticipations();
|
||||
|
||||
@@ -359,7 +359,7 @@ class ParticipationControllerTest extends WebTestCase
|
||||
"test that /fr/event/participation/new is redirecting");
|
||||
}
|
||||
|
||||
public function testMultipleWithSomePeopleParticipating()
|
||||
public function testNewMultipleWithSomePeopleParticipating()
|
||||
{
|
||||
$event = $this->getRandomEventWithMultipleParticipations();
|
||||
// record the number of participation for the event (used later in this test)
|
||||
@@ -419,5 +419,30 @@ class ParticipationControllerTest extends WebTestCase
|
||||
"Test we have persisted a new participation associated to the test");
|
||||
}
|
||||
|
||||
public function testEditMultipleAction()
|
||||
{
|
||||
/* @var $event \Chill\EventBundle\Entity\Event */
|
||||
$event = $this->getRandomEventWithMultipleParticipations();
|
||||
|
||||
$crawler = $this->client->request('GET', '/fr/event/participation/'.$event->getId().
|
||||
'/edit_multiple');
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$button = $crawler->selectButton('Mettre à jour');
|
||||
$this->assertEquals(1, $button->count(), "test the form with button 'mettre à jour' exists ");
|
||||
|
||||
|
||||
$this->client->submit($button->form(), array(
|
||||
'form[participations][0][role]' => $event->getType()->getRoles()->first()->getId(),
|
||||
'form[participations][0][status]' => $event->getType()->getStatuses()->first()->getId(),
|
||||
'form[participations][1][role]' => $event->getType()->getRoles()->last()->getId(),
|
||||
'form[participations][1][status]' => $event->getType()->getStatuses()->last()->getId(),
|
||||
));
|
||||
|
||||
$this->assertTrue($this->client->getResponse()
|
||||
->isRedirect('/fr/event/event/'.$event->getId().'/show'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user