/** * Tests the behavior of {@link PHP_Depend_Code_Method::getFirstChildOfType()}. * * @return void * @covers PHP_Depend_Code_Interface * @covers PHP_Depend_Code_AbstractClassOrInterface * @group pdepend * @group pdepend::code * @group unittest */ 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)); $interface = new PHP_Depend_Code_Interface('Interface'); $interface->addChild($node1); $interface->addChild($node2); $child = $interface->getFirstChildOfType('PHP_Depend_Code_ASTNodeI_' . md5(microtime())); $this->assertNull($child); }