Skip to content

Commit c7ba79a

Browse files
author
Mathieu Lemoine
committed
Reduced dependency to voryx/Thruway
1 parent b41e790 commit c7ba79a

7 files changed

+16
-12
lines changed

Tests/DbalConsumerTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Interop\Queue\Consumer;
1616
use Interop\Queue\Exception\InvalidMessageException;
1717
use Interop\Queue\Message;
18+
use PHPUnit\Framework\MockObject\MockObject;
1819
use PHPUnit\Framework\TestCase;
1920
use Ramsey\Uuid\Uuid;
2021

@@ -175,7 +176,7 @@ public function testRejectShouldReSendMessageToSameQueueOnRequeue()
175176
$producerMock
176177
->expects($this->once())
177178
->method('send')
178-
->with($this->identicalTo($queue), $this->isInstanceOf($message))
179+
->with($this->identicalTo($queue), $this->isInstanceOf(DbalMessage::class))
179180
;
180181

181182
$context = $this->createContextMock();
@@ -191,23 +192,23 @@ public function testRejectShouldReSendMessageToSameQueueOnRequeue()
191192
}
192193

193194
/**
194-
* @return DbalProducer|\PHPUnit_Framework_MockObject_MockObject
195+
* @return DbalProducer|MockObject
195196
*/
196197
private function createProducerMock()
197198
{
198199
return $this->createMock(DbalProducer::class);
199200
}
200201

201202
/**
202-
* @return \PHPUnit_Framework_MockObject_MockObject|DbalContext
203+
* @return MockObject|DbalContext
203204
*/
204205
private function createContextMock()
205206
{
206207
return $this->createMock(DbalContext::class);
207208
}
208209

209210
/**
210-
* @return \PHPUnit_Framework_MockObject_MockObject|DbalContext
211+
* @return MockObject|DbalContext
211212
*/
212213
private function createConectionMock()
213214
{

Tests/DbalContextTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Interop\Queue\Destination;
1414
use Interop\Queue\Exception\InvalidDestinationException;
1515
use Interop\Queue\Exception\TemporaryQueueNotSupportedException;
16+
use PHPUnit\Framework\MockObject\MockObject;
1617
use PHPUnit\Framework\TestCase;
1718

1819
class DbalContextTest extends TestCase
@@ -162,7 +163,7 @@ public function testShouldThrowBadMethodCallExceptionOncreateTemporaryQueueCall(
162163
}
163164

164165
/**
165-
* @return \PHPUnit_Framework_MockObject_MockObject|Connection
166+
* @return MockObject|Connection
166167
*/
167168
private function createConnectionMock()
168169
{

Tests/DbalProducerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Interop\Queue\Destination;
1010
use Interop\Queue\Exception\InvalidDestinationException;
1111
use Interop\Queue\Producer;
12+
use PHPUnit\Framework\MockObject\MockObject;
1213
use PHPUnit\Framework\TestCase;
1314

1415
class DbalProducerTest extends TestCase
@@ -40,7 +41,7 @@ public function testShouldThrowIfDestinationOfInvalidType()
4041
}
4142

4243
/**
43-
* @return \PHPUnit_Framework_MockObject_MockObject|DbalContext
44+
* @return MockObject|DbalContext
4445
*/
4546
private function createContextMock()
4647
{

Tests/DbalSubscriptionConsumerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Interop\Queue\Consumer;
1111
use Interop\Queue\Queue;
1212
use Interop\Queue\SubscriptionConsumer;
13+
use PHPUnit\Framework\MockObject\MockObject;
1314
use PHPUnit\Framework\TestCase;
1415

1516
class DbalSubscriptionConsumerTest extends TestCase
@@ -145,7 +146,7 @@ public function testThrowsIfTryConsumeWithoutSubscribers()
145146
}
146147

147148
/**
148-
* @return DbalContext|\PHPUnit_Framework_MockObject_MockObject
149+
* @return DbalContext|MockObject
149150
*/
150151
private function createDbalContextMock()
151152
{
@@ -155,7 +156,7 @@ private function createDbalContextMock()
155156
/**
156157
* @param mixed|null $queueName
157158
*
158-
* @return Consumer|\PHPUnit_Framework_MockObject_MockObject
159+
* @return Consumer|MockObject
159160
*/
160161
private function createConsumerStub($queueName = null)
161162
{

Tests/Functional/DbalConsumerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function setUp()
2626
$this->context = $this->createDbalContext();
2727
}
2828

29-
protected function tearDown()
29+
protected function tearDown(): void
3030
{
3131
if ($this->context) {
3232
$this->context->close();

Tests/ManagerRegistryConnectionFactoryTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Enqueue\Dbal\ManagerRegistryConnectionFactory;
99
use Enqueue\Test\ClassExtensionTrait;
1010
use Interop\Queue\ConnectionFactory;
11+
use PHPUnit\Framework\MockObject\MockObject;
1112
use PHPUnit\Framework\TestCase;
1213

1314
class ManagerRegistryConnectionFactoryTest extends TestCase
@@ -74,15 +75,15 @@ public function testShouldCreateLazyContext()
7475
}
7576

7677
/**
77-
* @return \PHPUnit_Framework_MockObject_MockObject|ManagerRegistry
78+
* @return MockObject|ManagerRegistry
7879
*/
7980
private function createManagerRegistryMock()
8081
{
8182
return $this->createMock(ManagerRegistry::class);
8283
}
8384

8485
/**
85-
* @return \PHPUnit_Framework_MockObject_MockObject|Connection
86+
* @return MockObject|Connection
8687
*/
8788
private function createConnectionMock()
8889
{

phpunit.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
1211
bootstrap="./vendor/autoload.php"
1312
>
1413

0 commit comments

Comments
 (0)