Skip to content

Commit

Permalink
Upgrade testing dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
casperboone committed Sep 13, 2020
1 parent 97052f5 commit d9f199d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
21 changes: 11 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<junit outputFile="build/report.junit.xml"/>
</logging>
</phpunit>
6 changes: 3 additions & 3 deletions tests/PushoverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([]);
}
Expand All @@ -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([]);
}
Expand All @@ -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([]);
}
Expand Down

0 comments on commit d9f199d

Please sign in to comment.