/**
  * testRuleNotAppliesForLongPrivateStaticProperty
  *
  * @return void
  * @since 1.1.0
  */
 public function testRuleNotAppliesForLongPrivateStaticProperty()
 {
     $rule = new PHP_PMD_Rule_Naming_LongVariable();
     $rule->addProperty('maximum', 17);
     $rule->setReport($this->getReportMock(0));
     $rule->apply($this->getClass());
 }
Ejemplo n.º 2
0
 /**
  * testRuleAppliesToIdenticalVariablesInDifferentContextsSeveralTimes
  *
  * @return void
  * @covers PHP_PMD_Rule_Naming_LongVariable
  * @group phpmd
  * @group phpmd::rule
  * @group phpmd::rule::naming
  * @group unittest
  */
 public function testRuleAppliesToIdenticalVariablesInDifferentContextsSeveralTimes()
 {
     $rule = new PHP_PMD_Rule_Naming_LongVariable();
     $rule->addProperty('maximum', 17);
     $rule->setReport($this->getReportMock(2));
     $class = $this->getClass();
     $rule->apply($class);
     foreach ($class->getMethods() as $method) {
         $rule->apply($method);
     }
 }