tests: Get rid of PHPUnit deprecations.

This commit is contained in:
Pol Dellaiera
2022-01-04 16:29:49 +01:00
parent 6ebcd87508
commit e2ad590310
17 changed files with 54 additions and 57 deletions

View File

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