QueueBindTest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 5
eloc 7
c 1
b 0
f 1
dl 0
loc 35
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A testGetExchange() 0 3 1
A testGetArguments() 0 3 1
A testIsNowait() 0 3 1
A testGetRoutingKey() 0 3 1
1
<?php declare(strict_types = 1);
2
3
namespace Portiny\RabbitMQ\Tests\Queue;
4
5
use PHPUnit\Framework\TestCase;
6
use Portiny\RabbitMQ\Queue\QueueBind;
7
8
final class QueueBindTest extends TestCase
9
{
10
	/**
11
	 * @var QueueBind
12
	 */
13
	private $queueBind;
14
15
16
	protected function setUp(): void
17
	{
18
		$this->queueBind = new QueueBind('someExchange', 'routingKey', true, ['b' => 2]);
19
	}
20
21
22
	public function testGetExchange(): void
23
	{
24
		self::assertSame('someExchange', $this->queueBind->getExchange());
25
	}
26
27
28
	public function testGetRoutingKey(): void
29
	{
30
		self::assertSame('routingKey', $this->queueBind->getRoutingKey());
31
	}
32
33
34
	public function testIsNowait(): void
35
	{
36
		self::assertTrue($this->queueBind->isNowait());
37
	}
38
39
40
	public function testGetArguments(): void
41
	{
42
		self::assertSame(['b' => 2], $this->queueBind->getArguments());
43
	}
44
45
}
46