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": {
"php": ">=7.3",
"php": "^7.3 || ^8.0",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3",
"behat/behat": "^3.2",
"behat/behat": "^3.9",
"behat/mink": "^1.7",
"behat/mink-extension": "^2.1",
"silverstripe/mink-facebook-web-driver": "^1",

View File

@ -130,9 +130,9 @@ class EmailContext implements Context
}
if (trim($negate)) {
Assert::assertNotContains($content, $emailContent);
Assert::assertStringNotContainsString($content, $emailContent);
} else {
Assert::assertContains($content, $emailContent);
Assert::assertStringContainsString($content, $emailContent);
}
}
@ -156,7 +156,7 @@ class EmailContext implements Context
$emailPlainText = strip_tags($emailContent);
$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"
if (trim($negate)) {
foreach ($rows as $row) {
Assert::assertNotContains($row[0], $emailContent);
Assert::assertStringNotContainsString($row[0], $emailContent);
}
} else {
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;
if (trim($negate)) {
Assert::assertNotContains($from, $match->From);
Assert::assertStringNotContainsString($from, $match->From);
} else {
Assert::assertContains($from, $match->From);
Assert::assertStringContainsString($from, $match->From);
}
}
@ -326,9 +326,9 @@ class EmailContext implements Context
$match = $this->lastMatchedEmail;
if (trim($negate)) {
Assert::assertNotContains($to, $match->To);
Assert::assertStringNotContainsString($to, $match->To);
} else {
Assert::assertContains($to, $match->To);
Assert::assertStringContainsString($to, $match->To);
}
}