/**
  * testRuleDoesNotApplyToPrivateMethodInChainedMethodCall
  *
  * <code>
  * class Foo {
  *     private function bar() {
  *         return new SplObjectStorage();
  *     }
  *     public function add($object) {
  *         $this->bar()->attach($object);
  *     }
  * }
  * </code>
  *
  * @return void
  */
 public function testRuleDoesNotApplyToPrivateMethodInChainedMethodCall()
 {
     $rule = new PHP_PMD_Rule_UnusedPrivateMethod();
     $rule->setReport($this->getReportMock(0));
     $rule->apply($this->getClass());
 }
Пример #2
0
 /**
  * testRuleDoesNotApplyToClassNameReferencedMethod
  *
  * @return void
  * @covers PHP_PMD_Rule_UnusedPrivateMethod
  * @group phpmd
  * @group phpmd::rule
  * @group unittest
  */
 public function testRuleDoesNotApplyToClassNameReferencedMethod()
 {
     $rule = new PHP_PMD_Rule_UnusedPrivateMethod();
     $rule->setReport($this->getReportMock(0));
     $rule->apply($this->getClass());
 }