cs: Second part - ignore test/app subdirectory.

This commit is contained in:
Pol Dellaiera
2021-11-23 14:34:34 +01:00
parent 5f37304796
commit 3ea35682eb
72 changed files with 326 additions and 365 deletions

View File

@@ -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,

View File

@@ -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'
);
}

View File

@@ -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