From 1d9cb191945ec57e163501c14fb8469fbc300eb0 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 29 Nov 2022 10:25:35 +0000 Subject: [PATCH 1/2] Bump phpunit/phpunit dependency --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7731be6..054e629 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "php-amqplib/php-amqplib": "^2.6" }, "require-dev": { - "phpunit/phpunit": "^6.0", + "phpunit/phpunit": "^8.0", "scrutinizer/ocular": "^1.2", "squizlabs/php_codesniffer": "^2.6" }, From 0359fdc39e9e46640cdbb2659325ac8a36c28723 Mon Sep 17 00:00:00 2001 From: Shift Date: Tue, 29 Nov 2022 10:25:37 +0000 Subject: [PATCH 2/2] Set return type of base TestCase methods From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type: - `setUpBeforeClass()` - `setUp()` - `assertPreConditions()` - `assertPostConditions()` - `tearDown()` - `tearDownAfterClass()` - `onNotSuccessfulTest()` [1]: https://phpunit.de/announcements/phpunit-8.html --- tests/ConsumerTest.php | 2 +- tests/ProducerTest.php | 2 +- tests/RpcClientTest.php | 2 +- tests/RpcServerTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ConsumerTest.php b/tests/ConsumerTest.php index 8dbe1c0..82f8f80 100644 --- a/tests/ConsumerTest.php +++ b/tests/ConsumerTest.php @@ -25,7 +25,7 @@ class ConsumerTest extends BaseTest */ public $mockChannel; - public function setUp() + protected function setUp(): void { $this->mockConnection = $this->getMockConnection(); $this->mockChannel = $this->getMockChannel(); diff --git a/tests/ProducerTest.php b/tests/ProducerTest.php index ec49f79..14d252b 100644 --- a/tests/ProducerTest.php +++ b/tests/ProducerTest.php @@ -25,7 +25,7 @@ class ProducerTest extends BaseTest */ private $mockChannel; - public function setUp() + protected function setUp(): void { $this->mockConnection = $this->getMockConnection(); $this->mockChannel = $this->getMockChannel(); diff --git a/tests/RpcClientTest.php b/tests/RpcClientTest.php index eab595d..e7a01d9 100644 --- a/tests/RpcClientTest.php +++ b/tests/RpcClientTest.php @@ -17,7 +17,7 @@ class RpcClientTest extends BaseTest */ private $mockChannel; - public function setUp() + protected function setUp(): void { $mockConnection = $this->getMockConnection(); $this->mockChannel = $this->getMockChannel(); diff --git a/tests/RpcServerTest.php b/tests/RpcServerTest.php index b3f9d44..4f12b25 100644 --- a/tests/RpcServerTest.php +++ b/tests/RpcServerTest.php @@ -23,7 +23,7 @@ class RpcServerTest extends BaseTest */ private $server; - public function setUp() + protected function setUp(): void { $this->mockConnection = $this->getMockConnection();