From 6e59b8e724f5b6d8ccdf06ed204e9186f4912f0f Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Fri, 6 Mar 2015 13:10:04 +0100 Subject: [PATCH] Refactoriing --- .../AccompanyingPeriodControllerTest.php | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Tests/Controller/AccompanyingPeriodControllerTest.php b/Tests/Controller/AccompanyingPeriodControllerTest.php index 7052152ad..e71a49527 100644 --- a/Tests/Controller/AccompanyingPeriodControllerTest.php +++ b/Tests/Controller/AccompanyingPeriodControllerTest.php @@ -2,8 +2,9 @@ /* * Chill is a software for social workers - * Copyright (C) 2015, Champs Libres Cooperative SCRLFS, - * + * + * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, + * , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -211,7 +212,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form();; + $form = $crawler->selectButton('Submit')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -244,13 +245,12 @@ class AccompanyingPeriodControllerTest extends WebTestCase */ public function testCreatePeriodWithClosingAfterCurrentFails() { - $this->markTestSkipped('this feature is not yet implemented'); $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form();; + $form = $crawler->selectButton('Submit')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -281,13 +281,12 @@ class AccompanyingPeriodControllerTest extends WebTestCase */ public function testCreatePeriodWithOpeningAndClosingAfterCurrentFails() { - $this->markTestSkipped('this feature is not yet implemented'); $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form();; + $form = $crawler->selectButton('Submit')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -360,7 +359,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form();; + $form = $crawler->selectButton('Submit')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -402,7 +401,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form();; + $form = $crawler->selectButton('Submit')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -444,7 +443,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase $crawler = $this->client->request('GET', '/en/person/' .$this->person->getId().'/accompanying-period/create'); - $form = $crawler->selectButton('Submit')->form();; + $form = $crawler->selectButton('Submit')->form(); $form->get(self::CLOSING_MOTIVE_INPUT) ->setValue($this->getLastValueOnClosingMotive($form)); $form->get(self::CLOSING_INPUT) @@ -459,6 +458,4 @@ class AccompanyingPeriodControllerTest extends WebTestCase $this->assertGreaterThan(0, $crawlerResponse->filter('.error')->count(), "an 'error' element is shown"); } - - -} +} \ No newline at end of file