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