aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-05-01 03:12:23 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-05-01 03:12:23 -0400
commit2aec6bb07cee438709e569b1cb3733ff3c9170b2 (patch)
treeebfea6f83482aeef53116b575c1fc6f115c2a045
parentb884573c1d322b207f9dcbcbc02806eed408fbab (diff)
downloadforums-2aec6bb07cee438709e569b1cb3733ff3c9170b2.tar
forums-2aec6bb07cee438709e569b1cb3733ff3c9170b2.tar.gz
forums-2aec6bb07cee438709e569b1cb3733ff3c9170b2.tar.bz2
forums-2aec6bb07cee438709e569b1cb3733ff3c9170b2.tar.xz
forums-2aec6bb07cee438709e569b1cb3733ff3c9170b2.zip
[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
-rw-r--r--tests/template/template_test.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index cb9563150a..e530b0f4e6 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -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));
}