Skip to content

Commit cb3204e

Browse files
Merge pull request #11 from LinioIT/feat/add-support-for-phpunit-v10
feat: add support for phpunit 10
2 parents 7fc4ecc + 967ee3d commit cb3204e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"php": ">=7.3 || ^8.0",
1919
"behat/behat": "^3.10",
2020
"guzzlehttp/guzzle": "~6 || ~7",
21-
"phpunit/phpunit": "6.0 || ^7.0 || ^8.0 || ^9.0"
21+
"phpunit/phpunit": "6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
2222
},
2323
"require-dev": {
2424
"slim/slim": "^4.0",

src/Context/WebApiContext.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function theResponseShouldContain($text)
206206
{
207207
$expectedRegexp = '/' . preg_quote($text) . '/i';
208208
$actual = (string) $this->response->getBody();
209-
Assertions::assertRegExp($expectedRegexp, $actual);
209+
Assertions::assertMatchesRegularExpression($expectedRegexp, $actual);
210210
}
211211

212212
/**
@@ -220,7 +220,7 @@ public function theResponseShouldNotContain($text)
220220
{
221221
$expectedRegexp = '/' . preg_quote($text) . '/';
222222
$actual = (string) $this->response->getBody();
223-
Assertions::assertNotRegExp($expectedRegexp, $actual);
223+
Assertions::assertDoesNotMatchRegularExpression($expectedRegexp, $actual);
224224
}
225225

226226
/**
@@ -270,7 +270,7 @@ protected function assertContains($expected, $actual)
270270

271271
if (preg_match('/^\%.+\%$/', $expected, $result)) {
272272
$pattern = sprintf('/%s/', trim($result[0], '%'));
273-
Assertions::assertRegExp($pattern, $actual);
273+
Assertions::assertMatchesRegularExpression($pattern, $actual);
274274

275275
return;
276276
}

0 commit comments

Comments
 (0)