mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs: Second part - ignore test/app
subdirectory.
This commit is contained in:
@@ -616,12 +616,12 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
$helper = $this->getHelper('question');
|
||||
$question = new ChoiceQuestion(
|
||||
sprintf(
|
||||
'Which postal code match the '
|
||||
'Which postal code match the '
|
||||
. 'name "%s" with postal code "%s" ? (default to "%s")',
|
||||
$locality,
|
||||
$postalCode,
|
||||
$names[0]
|
||||
),
|
||||
$locality,
|
||||
$postalCode,
|
||||
$names[0]
|
||||
),
|
||||
$names,
|
||||
0
|
||||
);
|
||||
@@ -908,11 +908,11 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
|
||||
$this->output->writeln(
|
||||
sprintf(
|
||||
'You have selected "%s"',
|
||||
is_array($answers[$matchingTableRowAnswer[$selected]]) ?
|
||||
'You have selected "%s"',
|
||||
is_array($answers[$matchingTableRowAnswer[$selected]]) ?
|
||||
implode(',', $answers[$matchingTableRowAnswer[$selected]]) :
|
||||
$answers[$matchingTableRowAnswer[$selected]]
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// recording value in cache
|
||||
@@ -933,10 +933,10 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
|
||||
$this->logger->debug(
|
||||
sprintf(
|
||||
"Found value : %s for custom field with question '%s'",
|
||||
is_array($value) ? implode(',', $value) : $value,
|
||||
$this->helper->localize($cf->getName())
|
||||
)
|
||||
"Found value : %s for custom field with question '%s'",
|
||||
is_array($value) ? implode(',', $value) : $value,
|
||||
$this->helper->localize($cf->getName())
|
||||
)
|
||||
);
|
||||
|
||||
return $value;
|
||||
|
@@ -64,9 +64,9 @@ class AccompanyingCourseWorkController extends AbstractController
|
||||
$this->addFlash(
|
||||
'error',
|
||||
$this->trans->trans(
|
||||
'accompanying_work.You must add at least ' .
|
||||
'accompanying_work.You must add at least ' .
|
||||
'one social issue on accompanying period'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
return $this->redirectToRoute('chill_person_accompanying_course_index', [
|
||||
|
@@ -296,7 +296,7 @@ class AccompanyingPeriodController extends AbstractController
|
||||
->add(
|
||||
'error',
|
||||
$this->get('translator')
|
||||
->trans('Period not opened : form is invalid')
|
||||
->trans('Period not opened : form is invalid')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ class LoadHouseholdPosition extends Fixture
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
foreach (self::POSITIONS_DATA as [$name, $share, $allowHolder,
|
||||
$ordering, $ref]) {
|
||||
$ordering, $ref, ]) {
|
||||
$position = (new Position())
|
||||
->setLabel(['fr' => $name])
|
||||
->setAllowHolder($allowHolder)
|
||||
|
@@ -857,8 +857,8 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
$container->prependExtensionConfig(
|
||||
'chill_custom_fields',
|
||||
['customizables_entities' => [
|
||||
['class' => 'Chill\PersonBundle\Entity\Person', 'name' => 'PersonEntity'],
|
||||
],
|
||||
['class' => 'Chill\PersonBundle\Entity\Person', 'name' => 'PersonEntity'],
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@@ -45,14 +45,14 @@ class Configuration implements ConfigurationInterface
|
||||
->defaultValue('P1D')
|
||||
->validate()
|
||||
->ifTrue(function ($period) {
|
||||
try {
|
||||
$interval = new DateInterval($period);
|
||||
} catch (Exception $ex) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
$interval = new DateInterval($period);
|
||||
} catch (Exception $ex) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
return false;
|
||||
})
|
||||
->thenInvalid('Invalid period for birthdate validation : "%s" '
|
||||
. 'The parameter should match duration as defined by ISO8601 : '
|
||||
. 'https://en.wikipedia.org/wiki/ISO_8601#Durations')
|
||||
|
@@ -197,7 +197,9 @@ class Household
|
||||
}
|
||||
|
||||
return -1;
|
||||
} elseif ($b->getPosition() === null) {
|
||||
}
|
||||
|
||||
if ($b->getPosition() === null) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -119,14 +119,14 @@ class AccompanyingPeriodControllerTest extends WebTestCase
|
||||
|
||||
$this->assertTrue(
|
||||
$this->client->getResponse()->isRedirect(
|
||||
'/fr/person/' . $this->person->getId() . '/accompanying-period'
|
||||
),
|
||||
'/fr/person/' . $this->person->getId() . '/accompanying-period'
|
||||
),
|
||||
'the server redirects to /accompanying-period page'
|
||||
);
|
||||
$this->assertGreaterThan(
|
||||
0,
|
||||
$this->client->followRedirect()
|
||||
->filter('.alert-success')->count(),
|
||||
->filter('.alert-success')->count(),
|
||||
"a 'success' element is shown"
|
||||
);
|
||||
}
|
||||
@@ -159,14 +159,14 @@ class AccompanyingPeriodControllerTest extends WebTestCase
|
||||
|
||||
$this->assertTrue(
|
||||
$this->client->getResponse()->isRedirect(
|
||||
'/fr/person/' . $this->person->getId() . '/accompanying-period'
|
||||
),
|
||||
'/fr/person/' . $this->person->getId() . '/accompanying-period'
|
||||
),
|
||||
'the server redirects to /accompanying-period page'
|
||||
);
|
||||
$this->assertGreaterThan(
|
||||
0,
|
||||
$this->client->followRedirect()
|
||||
->filter('.alert-success')->count(),
|
||||
->filter('.alert-success')->count(),
|
||||
"a 'success' element is shown"
|
||||
);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ class AccompanyingPeriodControllerTest extends WebTestCase
|
||||
$this->assertGreaterThan(
|
||||
0,
|
||||
$crawlerResponse
|
||||
->filter('.alert-danger')->count(),
|
||||
->filter('.alert-danger')->count(),
|
||||
"an '.alert-danger' element is shown"
|
||||
);
|
||||
}
|
||||
@@ -473,10 +473,10 @@ class AccompanyingPeriodControllerTest extends WebTestCase
|
||||
$this->client->request(
|
||||
'GET',
|
||||
sprintf(
|
||||
'/fr/person/%d/accompanying-period/%d/re-open',
|
||||
$this->person->getId(),
|
||||
$this->person->getOpenedAccompanyingPeriod()->getId()
|
||||
)
|
||||
'/fr/person/%d/accompanying-period/%d/re-open',
|
||||
$this->person->getId(),
|
||||
$this->person->getOpenedAccompanyingPeriod()->getId()
|
||||
)
|
||||
);
|
||||
$this->assertEquals(
|
||||
400,
|
||||
|
@@ -117,15 +117,15 @@ class PersonAddressControllerTest extends WebTestCase
|
||||
$this->assertEquals(
|
||||
1,
|
||||
$crawler
|
||||
->filter('div.flash_message.success')
|
||||
->count(),
|
||||
->filter('div.flash_message.success')
|
||||
->count(),
|
||||
'Asserting that the response page contains a success flash message'
|
||||
);
|
||||
$this->assertEquals(
|
||||
1,
|
||||
$crawler
|
||||
->filter('td:contains("Rue de la Paix, 50")')
|
||||
->count(),
|
||||
->filter('td:contains("Rue de la Paix, 50")')
|
||||
->count(),
|
||||
'Asserting that the page contains the new address'
|
||||
);
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class PersonAddressControllerTest extends WebTestCase
|
||||
$this->assertEquals(
|
||||
1,
|
||||
$crawler->filter('td:contains("Pas d\'adresse renseignée")')
|
||||
->count(),
|
||||
->count(),
|
||||
"assert that a message say 'no address given'"
|
||||
);
|
||||
}
|
||||
@@ -175,15 +175,15 @@ class PersonAddressControllerTest extends WebTestCase
|
||||
$this->assertGreaterThan(
|
||||
0,
|
||||
$crawler
|
||||
->filter('div.flash_message.success')
|
||||
->count(),
|
||||
->filter('div.flash_message.success')
|
||||
->count(),
|
||||
'Asserting that the response page contains a success flash message'
|
||||
);
|
||||
$this->assertEquals(
|
||||
1,
|
||||
$crawler
|
||||
->filter('td:contains("Rue du Trou Normand")')
|
||||
->count(),
|
||||
->filter('td:contains("Rue du Trou Normand")')
|
||||
->count(),
|
||||
'Asserting that the page contains the new address'
|
||||
);
|
||||
}
|
||||
|
@@ -26,9 +26,9 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
||||
*/
|
||||
class PersonVoterTest extends KernelTestCase
|
||||
{
|
||||
use PrepareUserTrait;
|
||||
use PrepareCenterTrait;
|
||||
use PrepareScopeTrait;
|
||||
use PrepareUserTrait;
|
||||
|
||||
/**
|
||||
* @var \Prophecy\Prophet
|
||||
|
@@ -22,8 +22,7 @@ class AddAPersonWidget implements WidgetInterface
|
||||
$place,
|
||||
array $context,
|
||||
array $config
|
||||
)
|
||||
{
|
||||
) {
|
||||
return $env->render('ChillPersonBundle:Widget:homepage_add_a_person.html.twig');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user