-
Notifications
You must be signed in to change notification settings - Fork 439
/
Copy pathDbalDestinationTest.php
38 lines (30 loc) · 1.04 KB
/
DbalDestinationTest.php
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
<?php
namespace Enqueue\Dbal\Tests;
use Enqueue\Dbal\DbalDestination;
use Enqueue\Test\ClassExtensionTrait;
use Interop\Queue\Destination;
use Interop\Queue\Queue;
use Interop\Queue\Topic;
use PHPUnit\Framework\TestCase;
class DbalDestinationTest extends TestCase
{
use ClassExtensionTrait;
public function testShouldImplementDestinationInterface()
{
$this->assertClassImplements(Destination::class, DbalDestination::class);
}
public function testShouldImplementTopicInterface()
{
$this->assertClassImplements(Topic::class, DbalDestination::class);
}
public function testShouldImplementQueueInterface()
{
$this->assertClassImplements(Queue::class, DbalDestination::class);
}
public function testShouldReturnTopicAndQueuePreviouslySetInConstructor()
{
$destination = new DbalDestination('topic-or-queue-name');
$this->assertSame('topic-or-queue-name', $destination->getQueueName());
$this->assertSame('topic-or-queue-name', $destination->getTopicName());
}
}