/** * testAcceptReturnsReturnValueOfVisitMethod * * @return void * @covers PHP_Depend_Code_ASTNode * @covers PHP_Depend_Code_ASTReturnStatement * @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('visitReturnStatement'))->will($this->returnValue(42)); $stmt = new PHP_Depend_Code_ASTReturnStatement(); self::assertEquals(42, $stmt->accept($visitor)); }
/** * testReturnStatementHasExpectedEndColumn * * @param PHP_Depend_Code_ASTReturnStatement $stmt * * @return void * @depends testReturnStatement */ public function testReturnStatementHasExpectedEndColumn($stmt) { $this->assertEquals(6, $stmt->getEndColumn()); }