/** * Tests the behavior of {@link PHP_Depend_Code_Function::getFirstChildOfType()}. * * @return void */ public function testGetFirstChildOfTypeReturnsTheExpectedNull() { $node1 = $this->getMock('PHP_Depend_Code_ASTNodeI', array(), array(), 'PHP_Depend_Code_ASTNodeI_' . md5(microtime())); $node1->expects($this->once())->method('getFirstChildOfType')->will($this->returnValue(null)); $node2 = $this->getMock('PHP_Depend_Code_ASTNodeI', array(), array(), 'PHP_Depend_Code_ASTNodeI_' . md5(microtime())); $node2->expects($this->once())->method('getFirstChildOfType')->will($this->returnValue(null)); $function = new PHP_Depend_Code_Function('Method'); $function->addChild($node1); $function->addChild($node2); $child = $function->getFirstChildOfType('PHP_Depend_Code_ASTNodeI_' . md5(microtime())); $this->assertNull($child); }