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": {
|
||||
"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",
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user