mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[feature/template-engine] Only copy files to cache if they exist.
When testing eval code path, compiled templates may not be written to the file system, and unconditionally trying to copy them breaks tests. PHPBB3-9726
This commit is contained in:
parent
b884573c1d
commit
2aec6bb07c
1 changed files with 3 additions and 2 deletions
|
@ -373,8 +373,9 @@ class phpbb_template_template_test extends phpbb_test_case
|
|||
{
|
||||
}
|
||||
|
||||
// For debugging
|
||||
if (self::PRESERVE_CACHE)
|
||||
// For debugging.
|
||||
// When testing eval path the cache file may not exist.
|
||||
if (self::PRESERVE_CACHE && file_exists($cache_file))
|
||||
{
|
||||
copy($cache_file, str_replace('ctpl_', 'tests_ctpl_', $cache_file));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue