Skip to content

Commit a32da43

Browse files
committed
Merge remote-tracking branch 'origin/refactor-for-phpunit-upgrade'
2 parents 49524ef + e25b4d4 commit a32da43

4 files changed

Lines changed: 92 additions & 92 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": "^7.5 || ^8.4",
24+
"phpunit/phpunit": "^9.0",
2525
"friendsofphp/php-cs-fixer": "^2.15",
2626
"phpstan/phpstan": "^0.12.83"
2727
},

test/BrowserlessTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ public function test_plainError()
657657
{
658658
$this->expectException(APIException::class);
659659
$this->expectExceptionCode(400);
660-
$this->expectExceptionMessageRegExp('/Failed to render PDF/');
661-
$this->expectExceptionMessageRegExp('/node-pdftk/');
660+
$this->expectExceptionMessageMatches('/Failed to render PDF/');
661+
$this->expectExceptionMessageMatches('/node-pdftk/');
662662

663663
$mock = new MockHandler([
664664
new Response(400, [], "The module 'node-pdftk' is not whitelisted in VM."),
@@ -680,8 +680,8 @@ public function test_jsonError()
680680
{
681681
$this->expectException(APIException::class);
682682
$this->expectExceptionCode(400);
683-
$this->expectExceptionMessageRegExp('/Failed to render PDF/');
684-
$this->expectExceptionMessageRegExp('/"rotate" must be one of/');
683+
$this->expectExceptionMessageMatches('/Failed to render PDF/');
684+
$this->expectExceptionMessageMatches('/"rotate" must be one of/');
685685

686686
$mock = new MockHandler([
687687
new Response(400, [], '[{"message":"\"rotate\" must be one of [90, -90, 180]","path":["rotate"],"type":"any.allowOnly","context":{"value":-1000,"valids":[90,-90,180],"key":"rotate","label":"rotate"}}]'),
@@ -703,8 +703,8 @@ public function test_miscError()
703703
{
704704
$this->expectException(APIException::class);
705705
$this->expectExceptionCode(0);
706-
$this->expectExceptionMessageRegExp('/Failed to render PDF/');
707-
$this->expectExceptionMessageRegExp('/Network error/');
706+
$this->expectExceptionMessageMatches('/Failed to render PDF/');
707+
$this->expectExceptionMessageMatches('/Network error/');
708708

709709
$mock = new MockHandler([
710710
new RequestException("Network error", new Request('GET', 'test'))

0 commit comments

Comments
 (0)