mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 23:37:39 +02:00
[ticket/11491] Only copy files from phpBB/ext/ the directory exists
PHPBB3-11491
This commit is contained in:
@@ -27,11 +27,16 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
|||||||
|
|
||||||
self::$helper = new phpbb_test_case_helpers(self);
|
self::$helper = new phpbb_test_case_helpers(self);
|
||||||
|
|
||||||
// First, move any extensions setup on the board to a temp directory
|
self::$copied_files = array();
|
||||||
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)
|
if (file_exists($phpbb_root_path . 'ext/'))
|
||||||
self::$helper->empty_dir($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
|
// 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/'));
|
self::$copied_files = array_merge(self::$copied_files, self::$helper->copy_dir(dirname(__FILE__) . '/../extension/ext/', $phpbb_root_path . 'ext/'));
|
||||||
|
Reference in New Issue
Block a user