From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Tue, 5 Jan 2021 13:35:11 -0400
Subject: Adapt to recent version of PHPUnit (9)

---
 tests/Pheanstalk/PheanstalkTest.php              |  8 ++------
 tests/Pheanstalk/ResponseParserExceptionTest.php |  6 ++----
 tests/Pheanstalk/ServerErrorExceptionTest.php    | 20 +++++---------------
 3 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/tests/Pheanstalk/PheanstalkTest.php b/tests/Pheanstalk/PheanstalkTest.php
index ba92623..81f94ba 100644
--- a/tests/Pheanstalk/PheanstalkTest.php
+++ b/tests/Pheanstalk/PheanstalkTest.php
@@ -71,11 +71,9 @@ class PheanstalkTest extends TestCase
         $this->assertEquals($pheanstalk->listTubesWatched(true), ['default']);
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception
-     */
     public function testIgnoreLastTube()
     {
+        $this->expectException('\Pheanstalk\Exception');
         $pheanstalk = $this->getPheanstalk();
 
         $pheanstalk->ignore('default');
@@ -164,11 +162,9 @@ class PheanstalkTest extends TestCase
         );
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception
-     */
     public function testPutJobTooBig()
     {
+        $this->expectException('\Pheanstalk\Exception');
         $pheanstalk = $this->getPheanstalk();
 
         $pheanstalk->put(str_repeat('0', 0x10000));
diff --git a/tests/Pheanstalk/ResponseParserExceptionTest.php b/tests/Pheanstalk/ResponseParserExceptionTest.php
index 2ff5341..13a158b 100644
--- a/tests/Pheanstalk/ResponseParserExceptionTest.php
+++ b/tests/Pheanstalk/ResponseParserExceptionTest.php
@@ -71,17 +71,15 @@ class ResponseParserExceptionTest extends TestCase
         );
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception\CommandException
-     */
     public function testPeekInvalidSubject()
     {
+        $this->expectException('\Pheanstalk\Exception\CommandException');
         new Command\PeekCommand('invalid');
     }
 
-    /** @expectedException \InvalidArgumentException */
     public function testYamlResponseParseInvalidMode()
     {
+        $this->expectException('\InvalidArgumentException');
         new YamlResponseParser('test');
     }
 
diff --git a/tests/Pheanstalk/ServerErrorExceptionTest.php b/tests/Pheanstalk/ServerErrorExceptionTest.php
index 59b5ae7..7f83781 100644
--- a/tests/Pheanstalk/ServerErrorExceptionTest.php
+++ b/tests/Pheanstalk/ServerErrorExceptionTest.php
@@ -45,43 +45,33 @@ class ServerErrorExceptionTest extends TestCase
         return $connection;
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception\ServerOutOfMemoryException
-     */
     public function testCommandsHandleOutOfMemory()
     {
+        $this->expectException('\Pheanstalk\Exception\ServerOutOfMemoryException');
         $this->connection('OUT_OF_MEMORY')->dispatchCommand($this->command);
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception\ServerInternalErrorException
-     */
     public function testCommandsHandleInternalError()
     {
+        $this->expectException('\Pheanstalk\Exception\ServerInternalErrorException');
         $this->connection('INTERNAL_ERROR')->dispatchCommand($this->command);
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception\ServerDrainingException
-     */
     public function testCommandsHandleDraining()
     {
+        $this->expectException('\Pheanstalk\Exception\ServerDrainingException');
         $this->connection('DRAINING')->dispatchCommand($this->command);
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception\ServerBadFormatException
-     */
     public function testCommandsHandleBadFormat()
     {
+        $this->expectException('\Pheanstalk\Exception\ServerBadFormatException');
         $this->connection('BAD_FORMAT')->dispatchCommand($this->command);
     }
 
-    /**
-     * @expectedException \Pheanstalk\Exception\ServerUnknownCommandException
-     */
     public function testCommandsHandleUnknownCommand()
     {
+        $this->expectException('\Pheanstalk\Exception\ServerUnknownCommandException');
         $this->connection('UNKNOWN_COMMAND')->dispatchCommand($this->command);
     }
 }
