-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
FILE_EXTERNAL breaks __DIR__ #6025
Copy link
Copy link
Closed
Labels
feature/phptEnd-to-end tests in PHPT formatEnd-to-end tests in PHPT formattype/bugSomething is brokenSomething is brokenversion/12Something affects PHPUnit 12Something affects PHPUnit 12version/13Something affects PHPUnit 13Something affects PHPUnit 13
Metadata
Metadata
Assignees
Labels
feature/phptEnd-to-end tests in PHPT formatEnd-to-end tests in PHPT formattype/bugSomething is brokenSomething is brokenversion/12Something affects PHPUnit 12Something affects PHPUnit 12version/13Something affects PHPUnit 13Something affects PHPUnit 13
Summary
An external PHP source file referenced by
FILE_EXTERNALbreaks 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 theFILE_EXTERNALsection, instead of the external file itself.How to reproduce
Expected behavior
Should print the parent directory of
my.phpt.Currently prints the same directory as
my.phpt.