Skip to content

Commit 49a7a01

Browse files
committed
Enhance QueueTest::testGetName()
1 parent 554350d commit 49a7a01

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/Unit/QueueTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@ public function provideConstructorInvalidArgumentData() : iterable
4545

4646
public function testGetName() : void
4747
{
48-
if (!class_exists(Client::class)) {
49-
$this->markTestSkipped('The tarantool\client package is not installed.');
50-
}
51-
52-
/** @var Client|MockObject $client */
53-
$client = $this->createMock(Client::class);
48+
/** @var \Tarantool|Client|MockObject $client */
49+
$client = class_exists(\Tarantool::class, false)
50+
? $this->createMock(\Tarantool::class)
51+
: $this->createMock(Client::class);
5452

5553
$queueName = uniqid('queue_', true);
5654
$queue = new Queue($client, $queueName);

0 commit comments

Comments
 (0)