StepSetEnvTest::testGetCommand()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 15

Duplication

Lines 21
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 21
loc 21
rs 9.3142
cc 1
eloc 15
nc 1
nop 0
1
<?php
2
/**
3
 * Test suite for the setEnv step.
4
 */
5
6
namespace Graviton\Deployment\Tests\Steps\CloudFoundry;
7
8
use Graviton\Deployment\DeployScriptsTestCase;
9
use Graviton\Deployment\Steps\CloudFoundry\StepSetEnv;
10
11
/**
12
 * @author   List of contributors <https://github.com/libgraviton/deploy-scripts/graphs/contributors>
13
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
14
 * @link     http://swisscom.ch
15
 */
16 View Code Duplication
class StepSetEnvTest extends DeployScriptsTestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
17
{
18
    /**
19
     * Validate getCommand
20
     *
21
     * @return void
22
     */
23
    public function testGetCommand()
24
    {
25
        $configuration = $this->getConfigurationSet();
26
        $step = new StepSetEnv(
27
            $configuration,
28
            'my_personal_application-unstable-blue',
29
            'SOME_ENV_VAR',
30
            'SOME_ENV_VAR_VALUE'
31
        );
32
33
        $this->assertEquals(
34
            array(
35
                '/usr/bin/cf',
36
                'set-env',
37
                'my_personal_application-unstable-blue',
38
                'SOME_ENV_VAR',
39
                'SOME_ENV_VAR_VALUE'
40
            ),
41
            $step->getCommand()
42
        );
43
    }
44
}
45