aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/extension_controller_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-07-04 00:14:48 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-07-04 00:14:48 +0200
commit68f001aaaf761268975d38d7ddcbdf024bb26def (patch)
treeafa75c51f61239f8ed842de8a8487a1b155ca69d /tests/functional/extension_controller_test.php
parent6fc997924c2c9792c8151db67e3273202951de3e (diff)
parentb3487b3167632f47d98eef25692924aa7ab25863 (diff)
downloadforums-68f001aaaf761268975d38d7ddcbdf024bb26def.tar
forums-68f001aaaf761268975d38d7ddcbdf024bb26def.tar.gz
forums-68f001aaaf761268975d38d7ddcbdf024bb26def.tar.bz2
forums-68f001aaaf761268975d38d7ddcbdf024bb26def.tar.xz
forums-68f001aaaf761268975d38d7ddcbdf024bb26def.zip
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11600
Diffstat (limited to 'tests/functional/extension_controller_test.php')
-rw-r--r--tests/functional/extension_controller_test.php56
1 files changed, 9 insertions, 47 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index a09035cb2b..9ddf1e3e5c 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -15,65 +15,27 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
{
protected $phpbb_extension_manager;
+ static private $helper;
+
static protected $fixtures = array(
- 'foo/bar/config/routing.yml',
- 'foo/bar/config/services.yml',
- 'foo/bar/controller/controller.php',
- 'foo/bar/styles/prosilver/template/foo_bar_body.html',
+ 'foo/bar/config/',
+ 'foo/bar/controller/',
+ 'foo/bar/styles/prosilver/template/',
);
- /**
- * 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();
- $directories = array(
- $phpbb_root_path . 'ext/foo/bar/',
- $phpbb_root_path . 'ext/foo/bar/config/',
- $phpbb_root_path . 'ext/foo/bar/controller/',
- $phpbb_root_path . 'ext/foo/bar/styles/prosilver/template',
- );
-
- foreach ($directories as $dir)
- {
- if (!is_dir($dir))
- {
- mkdir($dir, 0777, true);
- }
- }
-
- foreach (self::$fixtures as $fixture)
- {
- copy(
- "tests/functional/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;
-
- foreach (self::$fixtures as $fixture)
- {
- unlink("{$phpbb_root_path}ext/$fixture");
- }
+ parent::tearDownAfterClass();
- rmdir("{$phpbb_root_path}ext/foo/bar/config");
- rmdir("{$phpbb_root_path}ext/foo/bar/controller");
- rmdir("{$phpbb_root_path}ext/foo/bar/styles/prosilver/template");
- rmdir("{$phpbb_root_path}ext/foo/bar/styles/prosilver");
- rmdir("{$phpbb_root_path}ext/foo/bar/styles");
- rmdir("{$phpbb_root_path}ext/foo/bar");
- rmdir("{$phpbb_root_path}ext/foo");
+ self::$helper->restore_original_ext_dir();
}
public function setUp()