diff options
Diffstat (limited to 'tests/functional/metadata_manager_test.php')
-rw-r--r-- | tests/functional/metadata_manager_test.php | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php index 7e98b0d025..c55e7373ea 100644 --- a/tests/functional/metadata_manager_test.php +++ b/tests/functional/metadata_manager_test.php @@ -16,47 +16,25 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case { protected $phpbb_extension_manager; - static private $helpers; + static private $helper; static protected $fixtures = array( 'foo/bar/', ); - /** - * This should only be called once before the tests are run. - * This is used to copy the fixtures to the phpBB install - */ static public function setUpBeforeClass() { - global $phpbb_root_path; parent::setUpBeforeClass(); - self::$helpers = new phpbb_test_case_helpers(self); - - if (!file_exists($phpbb_root_path . 'ext/foo/bar/')) - { - self::$helpers->makedirs($phpbb_root_path . 'ext/foo/bar/'); - } - - foreach (self::$fixtures as $fixture) - { - self::$helpers->copy_dir(dirname(__FILE__) . '/fixtures/ext/' . $fixture, $phpbb_root_path . 'ext/' . $fixture); - } + self::$helper = new phpbb_test_case_helpers(self); + self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/fixtures/ext/', self::$fixtures); } - /** - * This should only be called once after the tests are run. - * This is used to remove the fixtures from the phpBB install - */ static public function tearDownAfterClass() { - global $phpbb_root_path; + parent::tearDownAfterClass(); - foreach (self::$fixtures as $fixture) - { - self::$helpers->empty_dir($phpbb_root_path . 'ext/' . $fixture); - } - self::$helpers->empty_dir($phpbb_root_path . 'ext/foo/'); + self::$helper->restore_original_ext_dir(); } public function setUp() |