TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
527 B
20 lines
527 B
<?php
|
|
|
|
use PhpAot\Php\CompilerTest;
|
|
|
|
class ClosureTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
public function testUseReferenceCaptureCompiles(): void
|
|
{
|
|
global $translator;
|
|
|
|
$testFile = ROOT_PATH . '/phpunit/code/closure/use-reference-capture.php';
|
|
$compiler = CompilerTest::create(ROOT_PATH);
|
|
$translator = $compiler;
|
|
$compiler->addFiles([$testFile]);
|
|
$compiler->prepareFile($testFile);
|
|
$compiler->convertFile($testFile);
|
|
|
|
$this->assertTrue(true);
|
|
}
|
|
}
|
|
|