testMeaninglessMethodNameRule()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 9
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 9
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 MeaninglessMethodNameTest
9
 *
10
 * @package MS\PHPMD\Tests\Functional\CleanCode
11
 */
12 View Code Duplication
class MeaninglessMethodNameTest 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\CleanCode\MeaninglessMethodName
16
     */
17
    public function testMeaninglessMethodNameRule()
18
    {
19
        $output = $this
20
            ->runPhpmd('Service/GeneralManager.php', 'cleancode.xml')
21
            ->getOutput();
22
23
        $this->assertContains('GeneralManager.php:15	Try to avoid meaningless method names like getData. Also getData,getInformation,setData,setInformation are meaningless. Find a name which is not so general.', $output);
24
        $this->assertNotContains('GeneralManager.php:25	Try to avoid meaningless method names', $output);
25
    }
26
}
27