mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-17 04:11:31 +02:00
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.
19 lines
480 B
PHP
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);
|
|
}
|
|
}
|