Inheritance: extends PHPSA\Compiler\Expression\AbstractExpressionCompiler
 public function testPassUnexpectedExpression()
 {
     $expr = new UnaryMinus();
     $this->assertSame('PhpParser\\Node\\Expr\\UnaryMinus', $expr->getName());
     $this->setExpectedException('InvalidArgumentException', 'Passed $expression must be instance of PhpParser\\Node\\Expr\\UnaryMinus');
     $expr->pass($this->newFakeScalarExpr(), $this->getContext());
 }
示例#2
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Passed $expression must be instance of PhpParser\Node\Expr\UnaryMinus
  */
 public function testPassUnexpectedExpression()
 {
     $expr = new UnaryMinus();
     self::assertSame('PhpParser\\Node\\Expr\\UnaryMinus', $expr->getName());
     $expr->pass($this->newFakeScalarExpr(), $this->getContext());
 }