ValidatorExtensionTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testContainerValidator() 0 5 1
A getExtension() 0 6 1
1
<?php
2
3
/**
4
 * This file is part of Symnedi.
5
 * Copyright (c) 2014 Tomas Votruba (http://tomasvotruba.cz)
6
 */
7
8
namespace Symnedi\Validator\Tests\DI;
9
10
use Nette\DI\Compiler;
11
use Nette\DI\ContainerBuilder;
12
use PHPUnit_Framework_TestCase;
13
use Symnedi\Validator\DI\ValidatorExtension;
14
15
16
class ValidatorExtensionTest extends PHPUnit_Framework_TestCase
17
{
18
19
	public function testContainerValidator()
20
	{
21
		$extension = $this->getExtension();
22
		$extension->loadConfiguration();
23
	}
24
25
26
	/**
27
	 * @return ValidatorExtension
28
	 */
29
	private function getExtension()
30
	{
31
		$extension = new ValidatorExtension;
32
		$extension->setCompiler(new Compiler(new ContainerBuilder), 'compiler');
33
		return $extension;
34
	}
35
36
}
37