예제 #1
0
 /**
  * testAcceptReturnsReturnValueOfVisitMethod
  *
  * @return void
  * @covers PHP_Depend_Code_ASTNode
  * @covers PHP_Depend_Code_ASTConstantDefinition
  * @group pdepend
  * @group pdepend::ast
  * @group unittest
  */
 public function testAcceptReturnsReturnValueOfVisitMethod()
 {
     $visitor = $this->getMock('PHP_Depend_Code_ASTVisitorI');
     $visitor->expects($this->once())->method('__call')->with($this->equalTo('visitConstantDefinition'))->will($this->returnValue(42));
     $node = new PHP_Depend_Code_ASTConstantDefinition();
     self::assertEquals(42, $node->accept($visitor));
 }
 /**
  * testConstantDefinitionWithDeclaratorsHasExpectedEndColumn
  *
  * @param PHP_Depend_Code_ASTConstantDefinition $constant
  *
  * @return void
  * @since 1.0.2
  * @depends testConstantDefinitionWithDeclarators
  */
 public function testConstantDefinitionWithDeclaratorsHasExpectedEndColumn($constant)
 {
     $this->assertEquals(18, $constant->getEndColumn());
 }