for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MS\PHPMD\Tests\Functional\CleanCode;
use MS\PHPMD\Tests\Functional\AbstractProcessTest;
/**
* Class ClassNameSingleResponsibility
*
* @package PHPMD\Tests\Functional\CleanCode
*/
class ClassNameSingleResponsibilityTest extends AbstractProcessTest
{
* @covers MS\PHPMD\Rule\CleanCode\ClassNameSingleResponsibility
public function testClassNameSingleResponsibilityRule()
$output = $this
->runPhpmd('Service/GeneralManager.php', 'cleancode.xml')
->getOutput();
$this->assertContains('Service/GeneralManager.php:8 Try to avoid general suffixes like Manager,Handler,Helper,Util,Utility,Information,Processor found Manager. It might violate of the single responsibility principle.', $output);
}
public function testRuleWithSingleResponsibilityClass()
->runPhpmd('FooController.php', 'cleancode.xml')
$this->assertEmpty(trim($output));