/**
  * Tests the behavior of {@link \PDepend\Source\AST\ASTMethod::findChildrenOfType()}.
  *
  * @return void
  */
 public function testFindChildrenOfTypeReturnsExpectedResult()
 {
     $node1 = $this->getMock('PDepend\\Source\\AST\\ASTNode', array(), array(), 'Class_' . __FUNCTION__ . '_' . md5(microtime()));
     $node1->expects($this->once())->method('findChildrenOfType')->will($this->returnValue(array()));
     $node2 = $this->getMock('PDepend\\Source\\AST\\ASTNode', array(), array(), 'Class_' . __FUNCTION__ . '_' . md5(microtime()));
     $node2->expects($this->once())->method('findChildrenOfType')->will($this->returnValue(array()));
     $method = new ASTMethod('Method');
     $method->addChild($node1);
     $method->addChild($node2);
     $children = $method->findChildrenOfType(get_class($node2));
     $this->assertSame(array($node2), $children);
 }