/** * Tests that the metrics adapter does not delegate a node without source * code file to a registered rule-set. * * @return void */ public function testAdapterDoesNotDelegateNonSourceClassNodeToRuleSet() { $mock = $this->getPHPDependClassMock(); $mock->expects($this->once())->method('isUserDefined')->will($this->returnValue(false)); $adapter = new PHP_PMD_Parser($this->getPHPDependMock()); $adapter->addRuleSet($this->getRuleSetMock()); $adapter->setReport($this->getReportMock(0)); $adapter->visitClass($mock); }