@@ 79-85 (lines=7) @@ | ||
76 | * |
|
77 | * @return void |
|
78 | */ |
|
79 | public function testAdapterDelegatesMethodNodeToRuleSet() |
|
80 | { |
|
81 | $adapter = new Parser($this->getPHPDependMock()); |
|
82 | $adapter->addRuleSet($this->getRuleSetMock(MethodNode::class)); |
|
83 | $adapter->setReport($this->getReportMock(0)); |
|
84 | $adapter->visitMethod($this->getPHPDependMethodMock()); |
|
85 | } |
|
86 | ||
87 | /** |
|
88 | * Tests that the metrics adapter does not delegate a node without source |
|
@@ 93-99 (lines=7) @@ | ||
90 | * |
|
91 | * @return void |
|
92 | */ |
|
93 | public function testAdapterDoesNotDelegateNonSourceMethodNodeToRuleSet() |
|
94 | { |
|
95 | $adapter = new Parser($this->getPHPDependMock()); |
|
96 | $adapter->addRuleSet($this->getRuleSetMock()); |
|
97 | $adapter->setReport($this->getReportMock(0)); |
|
98 | $adapter->visitMethod($this->getPHPDependMethodMock(null)); |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * Tests that the metrics adapter delegates a node to a registered rule-set. |
|
@@ 106-112 (lines=7) @@ | ||
103 | * |
|
104 | * @return void |
|
105 | */ |
|
106 | public function testAdapterDelegatesFunctionNodeToRuleSet() |
|
107 | { |
|
108 | $adapter = new Parser($this->getPHPDependMock()); |
|
109 | $adapter->addRuleSet($this->getRuleSetMock(FunctionNode::class)); |
|
110 | $adapter->setReport($this->getReportMock(0)); |
|
111 | $adapter->visitFunction($this->getPHPDependFunctionMock()); |
|
112 | } |
|
113 | ||
114 | /** |
|
115 | * Tests that the metrics adapter does not delegate a node without source |
|
@@ 120-126 (lines=7) @@ | ||
117 | * |
|
118 | * @return void |
|
119 | */ |
|
120 | public function testAdapterDoesNotDelegateNonSourceFunctionNodeToRuleSet() |
|
121 | { |
|
122 | $adapter = new Parser($this->getPHPDependMock()); |
|
123 | $adapter->addRuleSet($this->getRuleSetMock()); |
|
124 | $adapter->setReport($this->getReportMock(0)); |
|
125 | $adapter->visitFunction($this->getPHPDependFunctionMock(null)); |
|
126 | } |
|
127 | ||
128 | /** |
|
129 | * testParserStoreParsingExceptionsInReport |