File tree Expand file tree Collapse file tree 7 files changed +16
-12
lines changed Expand file tree Collapse file tree 7 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 15
15
use Interop \Queue \Consumer ;
16
16
use Interop \Queue \Exception \InvalidMessageException ;
17
17
use Interop \Queue \Message ;
18
+ use PHPUnit \Framework \MockObject \MockObject ;
18
19
use PHPUnit \Framework \TestCase ;
19
20
use Ramsey \Uuid \Uuid ;
20
21
@@ -175,7 +176,7 @@ public function testRejectShouldReSendMessageToSameQueueOnRequeue()
175
176
$ producerMock
176
177
->expects ($ this ->once ())
177
178
->method ('send ' )
178
- ->with ($ this ->identicalTo ($ queue ), $ this ->isInstanceOf ($ message ))
179
+ ->with ($ this ->identicalTo ($ queue ), $ this ->isInstanceOf (DbalMessage::class ))
179
180
;
180
181
181
182
$ context = $ this ->createContextMock ();
@@ -191,23 +192,23 @@ public function testRejectShouldReSendMessageToSameQueueOnRequeue()
191
192
}
192
193
193
194
/**
194
- * @return DbalProducer|\PHPUnit_Framework_MockObject_MockObject
195
+ * @return DbalProducer|MockObject
195
196
*/
196
197
private function createProducerMock ()
197
198
{
198
199
return $ this ->createMock (DbalProducer::class);
199
200
}
200
201
201
202
/**
202
- * @return \PHPUnit_Framework_MockObject_MockObject |DbalContext
203
+ * @return MockObject |DbalContext
203
204
*/
204
205
private function createContextMock ()
205
206
{
206
207
return $ this ->createMock (DbalContext::class);
207
208
}
208
209
209
210
/**
210
- * @return \PHPUnit_Framework_MockObject_MockObject |DbalContext
211
+ * @return MockObject |DbalContext
211
212
*/
212
213
private function createConectionMock ()
213
214
{
Original file line number Diff line number Diff line change 13
13
use Interop \Queue \Destination ;
14
14
use Interop \Queue \Exception \InvalidDestinationException ;
15
15
use Interop \Queue \Exception \TemporaryQueueNotSupportedException ;
16
+ use PHPUnit \Framework \MockObject \MockObject ;
16
17
use PHPUnit \Framework \TestCase ;
17
18
18
19
class DbalContextTest extends TestCase
@@ -162,7 +163,7 @@ public function testShouldThrowBadMethodCallExceptionOncreateTemporaryQueueCall(
162
163
}
163
164
164
165
/**
165
- * @return \PHPUnit_Framework_MockObject_MockObject |Connection
166
+ * @return MockObject |Connection
166
167
*/
167
168
private function createConnectionMock ()
168
169
{
Original file line number Diff line number Diff line change 9
9
use Interop \Queue \Destination ;
10
10
use Interop \Queue \Exception \InvalidDestinationException ;
11
11
use Interop \Queue \Producer ;
12
+ use PHPUnit \Framework \MockObject \MockObject ;
12
13
use PHPUnit \Framework \TestCase ;
13
14
14
15
class DbalProducerTest extends TestCase
@@ -40,7 +41,7 @@ public function testShouldThrowIfDestinationOfInvalidType()
40
41
}
41
42
42
43
/**
43
- * @return \PHPUnit_Framework_MockObject_MockObject |DbalContext
44
+ * @return MockObject |DbalContext
44
45
*/
45
46
private function createContextMock ()
46
47
{
Original file line number Diff line number Diff line change 10
10
use Interop \Queue \Consumer ;
11
11
use Interop \Queue \Queue ;
12
12
use Interop \Queue \SubscriptionConsumer ;
13
+ use PHPUnit \Framework \MockObject \MockObject ;
13
14
use PHPUnit \Framework \TestCase ;
14
15
15
16
class DbalSubscriptionConsumerTest extends TestCase
@@ -145,7 +146,7 @@ public function testThrowsIfTryConsumeWithoutSubscribers()
145
146
}
146
147
147
148
/**
148
- * @return DbalContext|\PHPUnit_Framework_MockObject_MockObject
149
+ * @return DbalContext|MockObject
149
150
*/
150
151
private function createDbalContextMock ()
151
152
{
@@ -155,7 +156,7 @@ private function createDbalContextMock()
155
156
/**
156
157
* @param mixed|null $queueName
157
158
*
158
- * @return Consumer|\PHPUnit_Framework_MockObject_MockObject
159
+ * @return Consumer|MockObject
159
160
*/
160
161
private function createConsumerStub ($ queueName = null )
161
162
{
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function setUp()
26
26
$ this ->context = $ this ->createDbalContext ();
27
27
}
28
28
29
- protected function tearDown ()
29
+ protected function tearDown (): void
30
30
{
31
31
if ($ this ->context ) {
32
32
$ this ->context ->close ();
Original file line number Diff line number Diff line change 8
8
use Enqueue \Dbal \ManagerRegistryConnectionFactory ;
9
9
use Enqueue \Test \ClassExtensionTrait ;
10
10
use Interop \Queue \ConnectionFactory ;
11
+ use PHPUnit \Framework \MockObject \MockObject ;
11
12
use PHPUnit \Framework \TestCase ;
12
13
13
14
class ManagerRegistryConnectionFactoryTest extends TestCase
@@ -74,15 +75,15 @@ public function testShouldCreateLazyContext()
74
75
}
75
76
76
77
/**
77
- * @return \PHPUnit_Framework_MockObject_MockObject |ManagerRegistry
78
+ * @return MockObject |ManagerRegistry
78
79
*/
79
80
private function createManagerRegistryMock ()
80
81
{
81
82
return $ this ->createMock (ManagerRegistry::class);
82
83
}
83
84
84
85
/**
85
- * @return \PHPUnit_Framework_MockObject_MockObject |Connection
86
+ * @return MockObject |Connection
86
87
*/
87
88
private function createConnectionMock ()
88
89
{
Original file line number Diff line number Diff line change 8
8
convertWarningsToExceptions =" true"
9
9
processIsolation =" false"
10
10
stopOnFailure =" false"
11
- syntaxCheck =" false"
12
11
bootstrap =" ./vendor/autoload.php"
13
12
>
14
13
You can’t perform that action at this time.
0 commit comments