diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php index a6277608f..0d64d0b65 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonCategoryControllerTest.php @@ -66,7 +66,7 @@ final class ActivityReasonCategoryControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php index a2ae8c13f..481098eb0 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityReasonControllerTest.php @@ -66,7 +66,7 @@ final class ActivityReasonControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php index a07f03770..7ccf26cf1 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityTypeControllerTest.php @@ -66,7 +66,7 @@ final class ActivityTypeControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php index 32513a837..b5e8ab438 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldControllerTest_TODO.php @@ -61,7 +61,7 @@ final class CustomFieldControllerTest_TODO extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php index 8966a45a1..21c5c89d9 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/EventControllerTest.php @@ -66,7 +66,7 @@ final class EventControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php index 4b69b9849..e2a8170d4 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/EventTypeControllerTest.php @@ -66,7 +66,7 @@ final class EventTypeControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php index d24b10a40..d720f7e7a 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/RoleControllerTest.php @@ -66,7 +66,7 @@ final class RoleControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php index d07909032..28bbab8e3 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/StatusControllerTest.php @@ -66,7 +66,7 @@ final class StatusControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php index 981bb3094..b5bb012a2 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/CenterControllerTest.php @@ -72,6 +72,6 @@ final class CenterControllerTest extends WebTestCase $crawler = $client->request('GET', '/fr/admin/center/'); // Check the entity has been delete on the list - $this->assertRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertMatchesRegularExpression('/Foo/', $client->getResponse()->getContent()); } } diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php index bed40b372..a7c53a75d 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php @@ -40,7 +40,7 @@ final class LoginControllerTest extends WebTestCase $this->assertTrue($client->getResponse()->isRedirect()); //the response is not a login page, but on a new page - $this->assertNotRegExp('/\/login$/', $client->getResponse() + $this->assertDoesNotMatchRegularExpression('/\/login$/', $client->getResponse() ->headers ->get('location')); @@ -48,7 +48,7 @@ final class LoginControllerTest extends WebTestCase $client->followRedirects(true); $crawler = $client->request('GET', '/'); - $this->assertRegExp('/center a_social/', $client->getResponse() + $this->assertMatchesRegularExpression('/center a_social/', $client->getResponse() ->getContent()); $logoutLinkFilter = $crawler->filter('a:contains("Se déconnecter")'); @@ -63,7 +63,7 @@ final class LoginControllerTest extends WebTestCase $client->followRedirect(); //redirect to login page //check we are back on login page - $this->assertRegExp('/\/login$/', $client->getResponse() + $this->assertMatchesRegularExpression('/\/login$/', $client->getResponse() ->headers ->get('location')); } diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php index f27eaa7a7..b7cb73cbf 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionsGroupControllerTest.php @@ -66,7 +66,7 @@ final class PermissionsGroupControllerTest extends WebTestCase $crawler = $client->followRedirect(); // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); + $this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent()); } */ diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php index 9519f983c..9bb6330d3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php @@ -50,8 +50,6 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase self::bootKernel(); $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); - $center = $em->getRepository(Center::class) - ->findOneBy(['name' => 'Center A']); $qb = $em->createQueryBuilder(); $personIds = $qb @@ -80,8 +78,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase while ($nbGenerated < $maxGenerated) { $id = array_pop($personIds)['id']; - $person = $em->getRepository(Person::class) - ->find($id); + $person = $em->getRepository(Person::class)->find($id); $periods = $person->getAccompanyingPeriods(); yield [array_pop($personIds)['id'], $periods[array_rand($periods)]->getId()]; diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php index f71ac9c12..391fad165 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php @@ -111,7 +111,7 @@ final class PersonAddressControllerTest extends WebTestCase $crawler = $this->client->followRedirect(); - $this->assertRegexp( + $this->assertMatchesRegularExpression( '|/fr/person/[0-9]{1,}/address/list|', $this->client->getHistory()->current()->getUri(), 'assert that the current page is on |/fr/person/[0-9]{1,}/address/list|' @@ -169,7 +169,7 @@ final class PersonAddressControllerTest extends WebTestCase $crawler = $this->client->followRedirect(); - $this->assertRegexp( + $this->assertMatchesRegularExpression( '|/fr/person/[0-9]{1,}/address/list|', $this->client->getHistory()->current()->getUri(), 'assert that the current page is on |/fr/person/[0-9]{1,}/address/list|' diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index f001d9bd1..3839eae5f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -206,7 +206,7 @@ final class PersonControllerCreateTest extends WebTestCase $client->followRedirect(); // visualize regexp here : http://jex.im/regulex/#!embed=false&flags=&re=%2Ffr%2Fperson%2F[1-9][0-9]*%2Fgeneral%2Fedit%24 - $this->assertRegExp( + $this->assertMatchesRegularExpression( '|/fr/person/[1-9][0-9]*/general/edit$|', $client->getHistory()->current()->getUri(), 'a valid form redirect to url /{_locale}/person/{personId}/general/edit' @@ -259,7 +259,7 @@ final class PersonControllerCreateTest extends WebTestCase 'a valid form redirect to url /{_locale}/person/{personId}/general/edit' ); $client->followRedirect(); - $this->assertRegExp( + $this->assertMatchesRegularExpression( '|/fr/person/[1-9][0-9]*/general/edit$|', $client->getHistory()->current()->getUri(), 'a valid form redirect to url /{_locale}/person/{personId}/general/edit' diff --git a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php index 592360a4f..b49f6be12 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php @@ -26,19 +26,19 @@ final class PersonSearchTest extends WebTestCase $this->markTestSkipped('skipped until adapted to new fixtures'); $crawlerSpecial = $this->generateCrawlerForSearch('@person manço'); - $this->assertRegExp('/MANÇO/', $crawlerSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/MANÇO/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person manco'); - $this->assertRegExp('/MANÇO/', $crawlerNoSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/MANÇO/', $crawlerNoSpecial->filter('.list-with-period')->text()); $crawlerSpecial = $this->generateCrawlerForSearch('@person Étienne'); - $this->assertRegExp('/Étienne/', $crawlerSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Étienne/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person etienne'); - $this->assertRegExp('/Étienne/', $crawlerNoSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Étienne/', $crawlerNoSpecial->filter('.list-with-period')->text()); } public function testExpected() @@ -49,7 +49,7 @@ final class PersonSearchTest extends WebTestCase 'q' => '@person Depardieu', ]); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testExpectedNamed() @@ -60,79 +60,79 @@ final class PersonSearchTest extends WebTestCase 'q' => '@person Depardieu', 'name' => 'person_regular', ]); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testLastNameAccentued() { $crawlerSpecial = $this->generateCrawlerForSearch('@person lastname:manço'); - $this->assertRegExp('/MANÇO/', $crawlerSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/MANÇO/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person lastname:manco'); - $this->assertRegExp('/MANÇO/', $crawlerNoSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/MANÇO/', $crawlerNoSpecial->filter('.list-with-period')->text()); } public function testSearchBirthdate() { $crawler = $this->generateCrawlerForSearch('@person birthdate:1948-12-27'); - $this->assertRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); - $this->assertRegExp('/Bart/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Gérard/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Bart/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstName() { $crawler = $this->generateCrawlerForSearch('@person firstname:Jean'); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNameAccented() { $crawlerSpecial = $this->generateCrawlerForSearch('@person firstname:Gérard'); - $this->assertRegExp('/Gérard/', $crawlerSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Gérard/', $crawlerSpecial->filter('.list-with-period')->text()); $crawlerNoSpecial = $this->generateCrawlerForSearch('@person firstname:Gerard'); - $this->assertRegExp('/Gérard/', $crawlerNoSpecial->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Gérard/', $crawlerNoSpecial->filter('.list-with-period')->text()); } public function testSearchByFirstNameLower() { $crawler = $this->generateCrawlerForSearch('@person firstname:Gérard'); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNameLower2() { $crawler = $this->generateCrawlerForSearch('@person firstname:jean'); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNamePartim() { $crawler = $this->generateCrawlerForSearch('@person firstname:Ger'); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testSearchByFirstNamePartim2() { $crawler = $this->generateCrawlerForSearch('@person firstname:ean'); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testSearchByLastName() { $crawler = $this->generateCrawlerForSearch('@person lastname:Depardieu'); - $this->assertRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testSearchCombineBirthdateAndLastName() @@ -140,8 +140,8 @@ final class PersonSearchTest extends WebTestCase $this->markTestSkipped('skipped until adapted to new fixtures'); $crawler = $this->generateCrawlerForSearch('@person birthdate:1948-12-27 lastname:(Van Snick)'); - $this->assertRegExp('/Bart/', $crawler->filter('.list-with-period')->text()); - $this->assertNotRegExp('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Bart/', $crawler->filter('.list-with-period')->text()); + $this->assertDoesNotMatchRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text()); } public function testSearchCombineGenderAndLastName() @@ -149,8 +149,8 @@ final class PersonSearchTest extends WebTestCase $this->markTestSkipped('skipped until adapted to new fixtures'); $crawler = $this->generateCrawlerForSearch('@person gender:woman lastname:(Depardieu)'); - $this->assertRegExp('/Charline/', $crawler->filter('.list-with-period')->text()); - $this->assertNotRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Charline/', $crawler->filter('.list-with-period')->text()); + $this->assertDoesNotMatchRegularExpression('/Gérard/', $crawler->filter('.list-with-period')->text()); } public function testSearchCombineLastnameAndFirstName() @@ -158,9 +158,9 @@ final class PersonSearchTest extends WebTestCase $this->markTestSkipped('skipped until adapted to new fixtures'); $crawler = $this->generateCrawlerForSearch('@person lastname:Depardieu firstname:Jean'); - $this->assertRegExp('/Depardieu/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Depardieu/', $crawler->filter('.list-with-period')->text()); //if this is a AND clause, Jean Depardieu should not appears - $this->assertNotRegExp( + $this->assertDoesNotMatchRegularExpression( '/Gérard/', $crawler->filter('.list-with-period')->text(), 'assert clause firstname and nationality are AND' @@ -172,9 +172,9 @@ final class PersonSearchTest extends WebTestCase $this->markTestSkipped('skipped until adapted to new fixtures'); $crawler = $this->generateCrawlerForSearch('@person lastname:Depardieu nationality:RU'); - $this->assertRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Gérard/', $crawler->filter('.list-with-period')->text()); //if this is a AND clause, Jean Depardieu should not appears - $this->assertNotRegExp( + $this->assertDoesNotMatchRegularExpression( '/Jean/', $crawler->filter('.list-with-period')->text(), 'assert clause firstname and nationality are AND' @@ -186,9 +186,9 @@ final class PersonSearchTest extends WebTestCase $this->markTestSkipped('skipped until adapted to new fixtures'); $crawler = $this->generateCrawlerForSearch('@person cha dep'); - $this->assertRegExp('/Charline/', $crawler->filter('.list-with-period')->text()); - $this->assertNotRegExp('/Gérard/', $crawler->filter('.list-with-period')->text()); - $this->assertNotRegExp('/Jean/', $crawler->filter('.list-with-period')->text()); + $this->assertMatchesRegularExpression('/Charline/', $crawler->filter('.list-with-period')->text()); + $this->assertDoesNotMatchRegularExpression('/Gérard/', $crawler->filter('.list-with-period')->text()); + $this->assertDoesNotMatchRegularExpression('/Jean/', $crawler->filter('.list-with-period')->text()); } /** @@ -199,12 +199,12 @@ final class PersonSearchTest extends WebTestCase $crawlerCanSee = $this->generateCrawlerForSearch('Gérard', 'center a_social'); $crawlerCannotSee = $this->generateCrawlerForSearch('Gérard', 'center b_social'); - $this->assertRegExp( + $this->assertMatchesRegularExpression( '/DEPARDIEU/', $crawlerCanSee->text(), 'center a_social may see "Depardieu" in center a' ); - $this->assertNotRegExp( + $this->assertDoesNotMatchRegularExpression( '/DEPARDIEU/', $crawlerCannotSee->text(), 'center b_social may not see "Depardieu" in center b' diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php index fed20de40..dfbf18503 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php @@ -212,7 +212,7 @@ final class ReportControllerTest extends WebTestCase $linkSee = $crawler->filter('.bt-view')->links(); $this->assertGreaterThan(0, count($linkSee)); - $this->assertRegExp(sprintf( + $this->assertMatchesRegularExpression(sprintf( '|/fr/person/%s/report/[0-9]*/view$|', self::$person->getId(), $reportId @@ -220,7 +220,7 @@ final class ReportControllerTest extends WebTestCase $linkUpdate = $crawler->filter('.bt-update')->links(); $this->assertGreaterThan(0, count($linkUpdate)); - $this->assertRegExp(sprintf( + $this->assertMatchesRegularExpression(sprintf( '|/fr/person/%s/report/[0-9]*/edit$|', self::$person->getId(), $reportId @@ -372,7 +372,7 @@ final class ReportControllerTest extends WebTestCase ); $client->followRedirect(); - $this->assertRegExp( + $this->assertMatchesRegularExpression( '|/fr/person/' . self::$person->getId() . '/report/[0-9]*/view$|', $client->getHistory()->current()->getUri(), "The next page is a redirection to the new report's view page" diff --git a/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php b/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php index 45b189aa7..b52e2f321 100644 --- a/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php @@ -43,7 +43,7 @@ final class ReportSearchTest extends WebTestCase ]); $this->assertTrue($client->getResponse()->isSuccessful()); - $this->assertRegExp('/Situation de logement/i', $crawler->text()); + $this->assertMatchesRegularExpression('/Situation de logement/i', $crawler->text()); } public function testSearchDoubleDate() @@ -77,7 +77,7 @@ final class ReportSearchTest extends WebTestCase ]); $this->assertTrue($client->getResponse()->isSuccessful()); - $this->assertRegExp('/Situation de logement/i', $crawler->text()); + $this->assertMatchesRegularExpression('/Situation de logement/i', $crawler->text()); } /**