diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2013-04-12 02:03:58 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2013-04-12 02:03:58 +0200 |
| commit | 3436e3f1020cce0a7d78edb7517335dfa6645024 (patch) | |
| tree | ac1babab772191e208a7014b11946b1506f64070 /tests/functional/extension_acp_test.php | |
| parent | 0b64db275bae14649e09031483b03ccc1943310b (diff) | |
| download | forums-3436e3f1020cce0a7d78edb7517335dfa6645024.tar forums-3436e3f1020cce0a7d78edb7517335dfa6645024.tar.gz forums-3436e3f1020cce0a7d78edb7517335dfa6645024.tar.bz2 forums-3436e3f1020cce0a7d78edb7517335dfa6645024.tar.xz forums-3436e3f1020cce0a7d78edb7517335dfa6645024.zip | |
[ticket/11491] Only copy files from phpBB/ext/ the directory exists
PHPBB3-11491
Diffstat (limited to 'tests/functional/extension_acp_test.php')
| -rw-r--r-- | tests/functional/extension_acp_test.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index e829e4582e..cb908e0f98 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -27,11 +27,16 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case self::$helper = new phpbb_test_case_helpers(self); - // First, move any extensions setup on the board to a temp directory - self::$copied_files = self::$helper->copy_dir($phpbb_root_path . 'ext/', $phpbb_root_path . 'store/temp_ext/'); + self::$copied_files = array(); - // Then empty the ext/ directory on the board (for accurate test cases) - self::$helper->empty_dir($phpbb_root_path . 'ext/'); + if (file_exists($phpbb_root_path . 'ext/')) + { + // First, move any extensions setup on the board to a temp directory + self::$copied_files = self::$helper->copy_dir($phpbb_root_path . 'ext/', $phpbb_root_path . 'store/temp_ext/'); + + // Then empty the ext/ directory on the board (for accurate test cases) + self::$helper->empty_dir($phpbb_root_path . 'ext/'); + } // Copy our ext/ files from the test case to the board self::$copied_files = array_merge(self::$copied_files, self::$helper->copy_dir(dirname(__FILE__) . '/../extension/ext/', $phpbb_root_path . 'ext/')); |
