mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #207 from creative-commoners/pulls/4/php8
DEP PHP8 support
This commit is contained in:
commit
0939a30b12
@ -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",
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user