Commit 330cc08
committed
test(e107RequireLegacyTemplate): rewrite cache-reuse template body to PHP 5.6-safe form
testRequireReusesCacheOnSecondCall builds a PHP template source as a
string, writes it to a temp file, and require()s the file three times.
The original body used null-coalescing (??) to seed $GLOBALS['__test_cached'],
which PHP 5.6 parses at require-time and fatals on, killing the test
process with exit 255 before PHPUnit can record the failure. Every test
in the file runs to completion on PHP 5.6 except this one, and the two
that come after it never get a chance to execute.
Rewrite the body to use isset()-ternary, which is semantically identical
and parses cleanly on every PHP version in the matrix. The test itself
(the outer file) was already 5.6-safe because the ?? lived inside a
string literal; only the templated source needed updating.1 parent 9ab57a7 commit 330cc08
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
0 commit comments