InlineIfTest::testInlineIfRule()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace MS\PHPMD\Tests\Functional\CleanCode;
4
5
use MS\PHPMD\Tests\Functional\AbstractProcessTest;
6
7
/**
8
 * Class InlineIfTest
9
 *
10
 * @package MS\PHPMD\Tests\Functional\CleanCode
11
 */
12
class InlineIfTest extends AbstractProcessTest
13
{
14
    /**
15
     * @covers MS\PHPMD\Rule\CleanCode\InlineIf
16
     */
17
    public function testInlineIfRule()
18
    {
19
        $output = $this
20
            ->runPhpmd('Service/GeneralManager.php', 'cleancode.xml')
21
            ->getOutput();
22
23
        $this->assertContains('GeneralManager.php:17	Try to avoid using inline ifs. They conceal the complexity of your code. Furthermore they obstruct the expandability. Refactor your code and increase the readability.', $output);
24
        $this->assertContains('GeneralManager.php:27	Try to avoid using inline ifs. They conceal the complexity of your code. Furthermore they obstruct the expandability. Refactor your code and increase the readability.', $output);
25
    }
26
}
27