Skip to content

Commit

Permalink
Downgrading to phpunit8 to be compliant with PHP7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre-T committed May 14, 2020
1 parent a98dc8b commit cfefbd8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Tests/Service/EvcServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public function setUp(): void

$this->requester = $this->getMockBuilder(RequestService::class)
->setConstructorArgs($params)
->onlyMethods(['get'])
//TODO replace with onlyMethods when PHP7.2 will be removed from compatibility and use only PHPUnit9
->setMethods(['get'])
->getMock()
;

Expand Down
6 changes: 4 additions & 2 deletions Tests/Service/RequestServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ private function getResponseMocked(string $body, int $code): MockObject
$response = new Response($code, $body, null, []);
$mock = $this->getMockBuilder(RequestService::class)
->setConstructorArgs($params)
->onlyMethods(['get'])
//TODO replace with onlyMethods when PHP7.2 will be removed from compatibility and use only PHPUnit9
->setMethods(['get'])
->getMock()
;

Expand All @@ -198,7 +199,8 @@ private function getThrowerMocked(string $message, int $code): MockObject
{
$mock = $this->getMockBuilder(RequestService::class)
->disableOriginalConstructor()
->onlyMethods(['get'])
//TODO replace with onlyMethods when PHP7.2 will be removed from compatibility and use only PHPUnit9
->setMethods(['get'])
->getMock()
;

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
"phpmd/phpmd": "^2.8",
"squizlabs/php_codesniffer": "^3.5",
"symfony/debug": "^3.4|^4.3|^5.0",
"phpunit/phpunit": "^8"
"phpunit/phpunit": "^8.5.4"
},
"scripts": {
"phpcs": "phpcs . --standard=phpcs.xml.dist -s",
"phpcsfixer": "php-cs-fixer fix . --config=.php_cs.dist --allow-risky yes",
"phpmd": "phpmd . xml phpmd.xml --exclude bin,vendor"
"phpmd": "phpmd . xml phpmd.xml --exclude bin,vendor",
"test": "phpunit"
},
"extra": {
"symfony": {
Expand Down

0 comments on commit cfefbd8

Please sign in to comment.