Пример #1
0
 /**
  * Tests the behavior of {@link PHP_Depend_Code_Method::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));
     $method = new PHP_Depend_Code_Method('Method');
     $method->addChild($node1);
     $method->addChild($node2);
     $child = $method->getFirstChildOfType('PHP_Depend_Code_ASTNodeI_' . md5(microtime()));
     self::assertNull($child);
 }