From d9f199ddb1ec50e934612a171b759b8a3395cbfe Mon Sep 17 00:00:00 2001 From: Casper Boone Date: Sun, 13 Sep 2020 21:39:25 +0200 Subject: [PATCH] Upgrade testing dependencies --- composer.json | 6 +++--- phpunit.xml.dist | 21 +++++++++++---------- tests/PushoverTest.php | 6 +++--- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index a51de50..cd29e82 100644 --- a/composer.json +++ b/composer.json @@ -18,9 +18,9 @@ "illuminate/support": " ^8.0" }, "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "~8.0", - "orchestra/testbench": "^4.0 || ^5.0", + "mockery/mockery": "^1.3.1", + "phpunit/phpunit": "^9.3", + "orchestra/testbench": "^6.0", "dms/phpunit-arraysubset-asserts": ">=0.1.0" }, "autoload": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 780c640..4d263c2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,16 +14,17 @@ tests - - - src/ - - + + + ./src + + + + + + + - - - - - + diff --git a/tests/PushoverTest.php b/tests/PushoverTest.php index 0a46f03..d51b8b9 100644 --- a/tests/PushoverTest.php +++ b/tests/PushoverTest.php @@ -80,7 +80,7 @@ public function it_throws_an_exception_when_pushover_returns_an_error_with_inval $guzzleResponse->shouldReceive('getStatusCode')->andReturn(400); $guzzleResponse->shouldReceive('getBody')->andReturn(''); - $this->guzzleClient->shouldReceive('post')->andThrow(new RequestException(null, $guzzleRequest, $guzzleResponse)); + $this->guzzleClient->shouldReceive('post')->andThrow(new RequestException('message', $guzzleRequest, $guzzleResponse)); $this->pushover->send([]); } @@ -96,7 +96,7 @@ public function it_throws_an_exception_when_pushover_returns_an_error_with_valid $guzzleResponse->shouldReceive('getStatusCode')->andReturn(400); $guzzleResponse->shouldReceive('getBody')->andReturn('{"errors": ["error_message_1", "error_message_2"]}'); - $this->guzzleClient->shouldReceive('post')->andThrow(new RequestException(null, $guzzleRequest, $guzzleResponse)); + $this->guzzleClient->shouldReceive('post')->andThrow(new RequestException('message', $guzzleRequest, $guzzleResponse)); $this->pushover->send([]); } @@ -109,7 +109,7 @@ public function it_throws_an_exception_when_pushover_returns_nothing() $guzzleRequest = Mockery::mock(\Psr\Http\Message\RequestInterface::class); - $this->guzzleClient->shouldReceive('post')->andThrow(new RequestException(null, $guzzleRequest, null)); + $this->guzzleClient->shouldReceive('post')->andThrow(new RequestException('message', $guzzleRequest, null)); $this->pushover->send([]); }