Merge pull request #207 from creative-commoners/pulls/4/php8

DEP PHP8 support
This commit is contained in:
Maxime Rainville 2021-11-08 11:40:48 +13:00 committed by GitHub
commit 0939a30b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -21,10 +21,10 @@
} }
], ],
"require": { "require": {
"php": ">=7.3", "php": "^7.3 || ^8.0",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3", "squizlabs/php_codesniffer": "^3",
"behat/behat": "^3.2", "behat/behat": "^3.9",
"behat/mink": "^1.7", "behat/mink": "^1.7",
"behat/mink-extension": "^2.1", "behat/mink-extension": "^2.1",
"silverstripe/mink-facebook-web-driver": "^1", "silverstripe/mink-facebook-web-driver": "^1",

View File

@ -130,9 +130,9 @@ class EmailContext implements Context
} }
if (trim($negate)) { if (trim($negate)) {
Assert::assertNotContains($content, $emailContent); Assert::assertStringNotContainsString($content, $emailContent);
} else { } else {
Assert::assertContains($content, $emailContent); Assert::assertStringContainsString($content, $emailContent);
} }
} }
@ -156,7 +156,7 @@ class EmailContext implements Context
$emailPlainText = strip_tags($emailContent); $emailPlainText = strip_tags($emailContent);
$emailPlainText = preg_replace("/\h+/", " ", $emailPlainText); $emailPlainText = preg_replace("/\h+/", " ", $emailPlainText);
Assert::assertContains($content, $emailPlainText); Assert::assertStringContainsString($content, $emailPlainText);
} }
/** /**
@ -265,11 +265,11 @@ class EmailContext implements Context
// For "should not contain" // For "should not contain"
if (trim($negate)) { if (trim($negate)) {
foreach ($rows as $row) { foreach ($rows as $row) {
Assert::assertNotContains($row[0], $emailContent); Assert::assertStringNotContainsString($row[0], $emailContent);
} }
} else { } else {
foreach ($rows as $row) { foreach ($rows as $row) {
Assert::assertContains($row[0], $emailContent); Assert::assertStringContainsString($row[0], $emailContent);
} }
} }
} }
@ -307,9 +307,9 @@ class EmailContext implements Context
$match = $this->lastMatchedEmail; $match = $this->lastMatchedEmail;
if (trim($negate)) { if (trim($negate)) {
Assert::assertNotContains($from, $match->From); Assert::assertStringNotContainsString($from, $match->From);
} else { } else {
Assert::assertContains($from, $match->From); Assert::assertStringContainsString($from, $match->From);
} }
} }
@ -326,9 +326,9 @@ class EmailContext implements Context
$match = $this->lastMatchedEmail; $match = $this->lastMatchedEmail;
if (trim($negate)) { if (trim($negate)) {
Assert::assertNotContains($to, $match->To); Assert::assertStringNotContainsString($to, $match->To);
} else { } else {
Assert::assertContains($to, $match->To); Assert::assertStringContainsString($to, $match->To);
} }
} }