/** * testRuleDoesNotApplyToPrivateMethodWithSuppressWarningsAnnotation * * @return void * @covers stdClass * @group phpmd * @group regression */ public function testRuleDoesNotApplyToPrivateMethodWithSuppressWarningsAnnotation() { $ruleSet = new PHP_PMD_RuleSet(); $ruleSet->addRule(new PHP_PMD_Rule_UnusedPrivateMethod()); $ruleSet->setReport($this->getReportMock(0)); $ruleSet->apply($this->getClass()); }
/** * testRuleSetInvokesRuleForClassInstance * * @return void */ public function testRuleSetInvokesRuleForClassInstance() { $rule = new PHP_PMD_Rule_ExcessivePublicCount(); $rule->addProperty('minimum', 3); $class = $this->getClass(); $class->setMetrics(array('cis' => 4)); $ruleSet = new PHP_PMD_RuleSet(); $ruleSet->addRule($rule); $ruleSet->setReport($this->getReportMock(1)); $ruleSet->apply($class); }
/** * testRuleDoesNotApplyToMethodParameterNamedArgv * * @return void */ public function testRuleDoesNotApplyToMethodParameterNamedArgv() { $ruleSet = new PHP_PMD_RuleSet(); $ruleSet->addRule(new PHP_PMD_Rule_UnusedFormalParameter()); $ruleSet->setReport($this->getReportMock(0)); $ruleSet->apply($this->getMethod()); }