예제 #1
0
 /**
  * testGetImageDelegatesToGetImageMethodOfWrappedNode
  *
  * @return void
  */
 public function testGetImageDelegatesToGetImageMethodOfWrappedNode()
 {
     $mock = $this->getMock('PDepend\\Source\\AST\\ASTNode');
     $mock->expects($this->once())->method('getImage');
     $node = new ASTNode($mock, __FILE__);
     $node->getImage();
 }
예제 #2
0
 /**
  * Stores the given literal node in an internal list of found variables.
  *
  * @param \PHPMD\Node\ASTNode $node
  * @return void
  */
 private function collectLiteral(ASTNode $node)
 {
     $variable = '$' . trim($node->getImage(), '\'');
     if (!isset($this->images[$variable])) {
         $this->images[$variable] = array();
     }
     $this->images[$variable][] = $node;
 }