Пример #1
0
 /**
  * testWhileStatementAlternativeScopeHasExpectedEndColumn
  *
  * @param PHP_Depend_Code_ASTWhileStatement $stmt
  *
  * @return void
  * @depends testWhileStatementWithAlternativeScope
  */
 public function testWhileStatementAlternativeScopeHasExpectedEndColumn($stmt)
 {
     $this->assertEquals(13, $stmt->getEndColumn());
 }
Пример #2
0
 /**
  * testAcceptReturnsReturnValueOfVisitMethod
  *
  * @return void
  * @covers PHP_Depend_Code_ASTNode
  * @covers PHP_Depend_Code_ASTWhileStatement
  * @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('visitWhileStatement'))->will($this->returnValue(42));
     $stmt = new PHP_Depend_Code_ASTWhileStatement();
     self::assertEquals(42, $stmt->accept($visitor));
 }