Files
PHP-Parser/test/PhpParser/CompatibilityTest.php
Nikita Popov b0469d127e Rename Expr\ClosureUse -> ClosureUse
This is not a real expression, treat it similarly to Node\Arg
or Node\Param.

The old name is retained as an alias for compatibility.
2022-06-12 21:55:56 +02:00

19 lines
480 B
PHP

<?php declare(strict_types=1);
namespace PhpParser;
use PhpParser\Node\Expr;
class CompatibilityTest extends \PHPUnit\Framework\TestCase
{
public function testAliases1() {
$node = new Node\ClosureUse(new Expr\Variable('x'));
$this->assertTrue($node instanceof Expr\ClosureUse);
}
public function testAliases2() {
$node = new Node\Expr\ClosureUse(new Expr\Variable('x'));
$this->assertTrue($node instanceof Node\ClosureUse);
}
}