test: add phpx directory detection test

pull/1/head
韩天峰 4 months ago
parent c4c218485a
commit 4d04b34cc8
  1. 12
      test_phpx_dir.php

@ -0,0 +1,12 @@
<?php
require __DIR__ . '/vendor/autoload.php';
$compiler = new PhpAot\Php\CompilerBase();
$ref = new ReflectionMethod($compiler, 'getPhpxDir');
$ref->setAccessible(true);
echo "Testing getPhpxDir()...\n";
echo "PHPX_HOME env: " . (getenv('PHPX_HOME') ?: '(not set)') . "\n";
echo "Result: " . $ref->invoke($compiler) . "\n";
echo "Directory exists: " . (is_dir($ref->invoke($compiler)) ? 'YES' : 'NO') . "\n";
Loading…
Cancel
Save