ConfigurationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testLoadExpectingException() 0 15 1
1
<?php
2
/**
3
 * Test suite to validate the Configuration class
4
 */
5
6
namespace Graviton\Deployment;
7
8
use Symfony\Component\Config\FileLocator;
9
10
/**
11
 * @author   List of contributors <https://github.com/libgraviton/deploy-scripts/graphs/contributors>
12
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
13
 * @link     http://swisscom.ch
14
 */
15
class ConfigurationTest extends DeployScriptsTestCase
16
{
17
    /**
18
     * @return void
19
     */
20
    public function testLoadExpectingException()
21
    {
22
        $fileLocator = new FileLocator(__DIR__ . '/Resources/config');
23
        $processorDouble = $this->getConfigurationProcessorDouble(array('processConfiguration'));
24
        $processorDouble
25
            ->expects($this->once())
26
            ->method('processConfiguration')
27
            ->willReturn(array());
28
29
        $configuration = new Configuration($processorDouble, $fileLocator);
30
31
        $this->setExpectedException('\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
32
33
        $configuration->load();
34
    }
35
}
36