/** * testAcceptReturnsReturnValueOfVisitMethod * * @return void * @covers PHP_Depend_Code_ASTNode * @covers PHP_Depend_Code_ASTAssignmentExpression * @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('visitAssignmentExpression'))->will($this->returnValue(42)); $node = new PHP_Depend_Code_ASTAssignmentExpression(); self::assertEquals(42, $node->accept($visitor)); }
/** * Tests the end line of an assignment-expression. * * @param PHP_Depend_Code_ASTAssignmentExpression $expr * * @return void * @depends testChainedPropertyAssignmentExpression */ public function testChainedPropertyAssignmentExpressionHasExpectedEndLine($expr) { $this->assertEquals(8, $expr->getEndLine()); }