File: 0002-Adapt-to-recent-version-of-PHPUnit-9.patch

package info (click to toggle)
php-pda-pheanstalk 4.0.5-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 608 kB
  • sloc: php: 2,658; xml: 60; makefile: 15
file content (117 lines) | stat: -rw-r--r-- 4,181 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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);
     }
 }