상속: extends PHPSA\Compiler\Expression\AbstractExpressionCompiler
예제 #1
0
 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());
 }