Open
Description
Q | A |
---|---|
PHPUnit version | 11.3.6 |
PHP version | 8.2.15 |
Installation Method | Composer |
Summary
An external PHP source file referenced by FILE_EXTERNAL
breaks assumptions about __DIR__
pointing to directory of the source file so referenced.
Current behavior
It seems __DIR__
resolves to the directory of the test file including the source so specified in the FILE_EXTERNAL
section, instead of the external file itself.
How to reproduce
# my.phpt
--FILE_EXTERNAL--
../external.php
# ../external.php
echo __DIR__, "\n";
Expected behavior
Should print the parent directory of my.phpt
.
Currently prints the same directory as my.phpt
.
Activity