testMethodNameUnderstandableRule()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 12
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 12
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace MS\PHPMD\Tests\Functional\Test;
4
5
use MS\PHPMD\Tests\Functional\AbstractProcessTest;
6
7
/**
8
 * Class MethodNameUnderstandableTest
9
 *
10
 * @package MS\PHPMD\Tests\Functional\Test
11
 */
12 View Code Duplication
class MethodNameUnderstandableTest extends AbstractProcessTest
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...
13
{
14
    /**
15
     * @covers MS\PHPMD\Rule\Test\MethodNameUnderstandable
16
     * @covers MS\PHPMD\Rule\Test\AbstractTestRule
17
     */
18
    public function testMethodNameUnderstandableRule()
19
    {
20
        $output = $this
21
            ->runPhpmd('Tests/Test.php', 'test.xml')
22
            ->getOutput();
23
24
        $this->assertNotContains('Test.php:13', $output);
25
        $this->assertNotContains('Test.php:25', $output);
26
27
        $this->assertContains('Test.php:37	Only 1 words are found in the method name. Try to describe your code as good as you can with 3 or more words.', $output);
28
        $this->assertContains('Test.php:52	Only 1 words are found in the method name. Try to describe your code as good as you can with 3 or more words.', $output);
29
    }
30
}
31