ProophExtensionConfiguratorTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 26
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetConfigKey_ShouldBeProoph() 0 8 1
A givenProophExtensionConfigurator() 0 4 1
A whenGetConfigKey() 0 4 1
A thenItIsExpectedString() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace TomCizek\SymfonyProoph\Tests;
4
5
use PHPUnit\Framework\TestCase;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use TomCizek\SymfonyProoph\ProophExtensionConfigurator;
8
9
class ProophExtensionConfiguratorTest extends TestCase
10
{
11
	public function testGetConfigKey_ShouldBeProoph()
12
	{
13
		$configurator = $this->givenProophExtensionConfigurator();
14
15
		$key = $this->whenGetConfigKey($configurator);
16
17
		$this->thenItIsExpectedString($key);
18
	}
19
20
	public function givenProophExtensionConfigurator(): ProophExtensionConfigurator
21
	{
22
		return new ProophExtensionConfigurator(new ContainerBuilder());
23
	}
24
25
	public function whenGetConfigKey(ProophExtensionConfigurator $configurator): string
26
	{
27
		return $configurator->getConfigKey();
28
	}
29
30
	public function thenItIsExpectedString(string $key): void
31
	{
32
		self::assertEquals('prooph', $key);
33
	}
34
}
35