Skip to content

Commit

Permalink
DEP PHP8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 7, 2021
1 parent 6ccf840 commit c7563fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions src/Context/EmailContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ public function thereTheEmailContains($negate, $content)
}

if (trim($negate)) {
Assert::assertNotContains($content, $emailContent);
Assert::assertStringNotContainsString($content, $emailContent);
} else {
Assert::assertContains($content, $emailContent);
Assert::assertStringContainsString($content, $emailContent);
}
}

Expand All @@ -156,7 +156,7 @@ public function thereTheEmailContainsPlainText($content)
$emailPlainText = strip_tags($emailContent);
$emailPlainText = preg_replace("/\h+/", " ", $emailPlainText);

Assert::assertContains($content, $emailPlainText);
Assert::assertStringContainsString($content, $emailPlainText);
}

/**
Expand Down Expand Up @@ -265,11 +265,11 @@ public function theEmailContainFollowingData($negate, TableNode $table)
// 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);
}
}
}
Expand Down Expand Up @@ -307,9 +307,9 @@ public function theEmailSentFrom($negate, $from)

$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);
}
}

Expand All @@ -326,9 +326,9 @@ public function theEmailSentTo($negate, $to)

$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);
}
}

Expand Down

0 comments on commit c7563fd

Please sign in to comment.