TestCase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 1
c 1
b 1
f 0
lcom 0
cbo 7
dl 0
loc 27
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B createContainer() 0 24 1
1
<?php
2
3
/*
4
 * This file is part of the Stinger Soft Platform package.
5
 *
6
 * (c) Oliver Kotte <[email protected]>
7
 * (c) Florian Meyer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
namespace StingerSoft\PlatformBundle\Tests;
13
14
use StingerSoft\PlatformBundle\DependencyInjection\StingerSoftPlatformExtension;
15
use StingerSoft\PlatformBundle\StingerSoftPlatformBundle;
16
use Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass;
17
use Symfony\Component\DependencyInjection\ContainerBuilder;
18
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
19
20
/**
21
 * $LastChangedBy: $
22
 * $LastChangedDate: $
23
 *
24
 * Class TestCase
25
 */
26
class TestCase extends \PHPUnit_Framework_TestCase {
27
28
	public function createContainer() {
29
		$container = new ContainerBuilder(new ParameterBag(array(
30
			'kernel.debug' => false,
31
			// 'kernel.bundles' => array('YamlBundle' => 'Fixtures\Bundles\YamlBundle\YamlBundle'),
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
32
			'kernel.cache_dir' => sys_get_temp_dir(),
33
			'kernel.environment' => 'test',
34
			'kernel.root_dir' => __DIR__ . '/../../../../' 
35
		) // src dir
36
));
37
		$extension = new StingerSoftPlatformExtension();
38
		$container->registerExtension($extension);
39
		$extension->load(array(), $container);
40
		
41
		$bundle = new StingerSoftPlatformBundle();
42
		$bundle->build($container);
43
		
44
		$container->getCompilerPassConfig()->setOptimizationPasses(array(
45
			new ResolveDefinitionTemplatesPass() 
46
		));
47
		$container->getCompilerPassConfig()->setRemovingPasses(array());
48
		$container->compile();
49
		
50
		return $container;
51
	}
52
}