/** * testAcceptReturnsReturnValueOfVisitMethod * * @return void * @covers PHP_Depend_Code_ASTNode * @covers PHP_Depend_Code_ASTUnaryExpression * @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('visitUnaryExpression'))->will($this->returnValue(42)); $expr = new PHP_Depend_Code_ASTUnaryExpression(); self::assertEquals(42, $expr->accept($visitor)); }
/** * Constructs a new cast-expression node. * * @param string $image The original cast image. */ public function __construct($image) { parent::__construct(preg_replace('(\\s+)', '', strtolower($image))); }
/** * testUnaryExpressionHasExpectedEndColumn * * @param PHP_Depend_Code_ASTUnaryExpression $expr * * @return void * @depends testUnaryExpression */ public function testUnaryExpressionHasExpectedEndColumn($expr) { $this->assertEquals(14, $expr->getEndColumn()); }