mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
cs: Second part - ignore test/app
subdirectory.
This commit is contained in:
@@ -66,8 +66,8 @@ class ReportControllerNextTest extends WebTestCase
|
||||
$filteredCustomFieldsGroupHouse = array_filter(
|
||||
$customFieldsGroups,
|
||||
function (CustomFieldsGroup $group) {
|
||||
return in_array('Situation de logement', $group->getName());
|
||||
}
|
||||
return in_array('Situation de logement', $group->getName());
|
||||
}
|
||||
);
|
||||
$this->group = $filteredCustomFieldsGroupHouse[0];
|
||||
}
|
||||
|
@@ -83,8 +83,8 @@ class ReportControllerTest extends WebTestCase
|
||||
$filteredCustomFieldsGroupHouse = array_filter(
|
||||
$customFieldsGroups,
|
||||
function (CustomFieldsGroup $group) {
|
||||
return in_array('Situation de logement', $group->getName());
|
||||
}
|
||||
return in_array('Situation de logement', $group->getName());
|
||||
}
|
||||
);
|
||||
static::$group = $filteredCustomFieldsGroupHouse[0];
|
||||
|
||||
@@ -136,7 +136,7 @@ class ReportControllerTest extends WebTestCase
|
||||
$this->assertGreaterThan(
|
||||
1,
|
||||
count($form->get(self::REPORT_NAME_FIELD)
|
||||
->availableOptionValues()),
|
||||
->availableOptionValues()),
|
||||
'I can choose between report models'
|
||||
);
|
||||
|
||||
@@ -253,9 +253,9 @@ class ReportControllerTest extends WebTestCase
|
||||
);
|
||||
$this->assertContains(
|
||||
sprintf(
|
||||
'/fr/person/%d/report/select/type/for/creation',
|
||||
static::$person->getId()
|
||||
),
|
||||
'/fr/person/%d/report/select/type/for/creation',
|
||||
static::$person->getId()
|
||||
),
|
||||
$link->getUri(),
|
||||
'There is a "add a report" link in menu'
|
||||
);
|
||||
@@ -334,10 +334,10 @@ class ReportControllerTest extends WebTestCase
|
||||
|
||||
$this->assertTrue($client->getResponse()->isRedirect(
|
||||
sprintf(
|
||||
'/fr/person/%s/report/%s/view',
|
||||
static::$person->getId(),
|
||||
$reportId
|
||||
)
|
||||
'/fr/person/%s/report/%s/view',
|
||||
static::$person->getId(),
|
||||
$reportId
|
||||
)
|
||||
));
|
||||
|
||||
$this->assertEquals(new DateTime('yesterday'), static::$kernel->getContainer()
|
||||
@@ -416,8 +416,7 @@ class ReportControllerTest extends WebTestCase
|
||||
Person $person,
|
||||
CustomFieldsGroup $group,
|
||||
\Symfony\Component\BrowserKit\Client $client
|
||||
)
|
||||
{
|
||||
) {
|
||||
$url = sprintf(
|
||||
'fr/person/%d/report/cfgroup/%d/new',
|
||||
$person->getId(),
|
||||
|
@@ -25,9 +25,9 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
||||
*/
|
||||
class ReportVoterTest extends KernelTestCase
|
||||
{
|
||||
use PrepareUserTrait;
|
||||
use PrepareCenterTrait;
|
||||
use PrepareScopeTrait;
|
||||
use PrepareUserTrait;
|
||||
|
||||
/**
|
||||
* @var \Prophecy\Prophet
|
||||
@@ -131,8 +131,7 @@ class ReportVoterTest extends KernelTestCase
|
||||
$action,
|
||||
$message,
|
||||
?User $user = null
|
||||
)
|
||||
{
|
||||
) {
|
||||
$token = $this->prepareToken($user);
|
||||
$result = $this->voter->vote($token, $report, [$action]);
|
||||
$this->assertEquals($expectedResult, $result, $message);
|
||||
|
@@ -62,8 +62,8 @@ class TimelineProviderTest extends WebTestCase
|
||||
|
||||
$scopesSocial = array_filter(
|
||||
static::$em
|
||||
->getRepository('ChillMainBundle:Scope')
|
||||
->findAll(),
|
||||
->getRepository('ChillMainBundle:Scope')
|
||||
->findAll(),
|
||||
function (Scope $scope) { return $scope->getName()['en'] === 'social'; }
|
||||
);
|
||||
|
||||
@@ -104,7 +104,7 @@ class TimelineProviderTest extends WebTestCase
|
||||
$this->assertEquals(
|
||||
0,
|
||||
$crawler->filter('.report_entry .summary')
|
||||
->count(),
|
||||
->count(),
|
||||
'the page does not contains a .report .summary element'
|
||||
);
|
||||
}
|
||||
@@ -152,19 +152,19 @@ class TimelineProviderTest extends WebTestCase
|
||||
$this->assertGreaterThan(
|
||||
0,
|
||||
$crawler->filter('.report_entry .summary')
|
||||
->count(),
|
||||
->count(),
|
||||
'the page contains a .report .summary element'
|
||||
);
|
||||
$this->assertContains(
|
||||
'blah blah',
|
||||
$crawler->filter('.report_entry .summary')
|
||||
->text(),
|
||||
->text(),
|
||||
'the page contains the text "blah blah"'
|
||||
);
|
||||
$this->assertContains(
|
||||
'Propriétaire',
|
||||
$crawler->filter('.report_entry .summary')
|
||||
->text(),
|
||||
->text(),
|
||||
'the page contains the mention "Propriétaire"'
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user