aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-03-19 09:56:48 -0400
committerDavid King <imkingdavid@gmail.com>2012-03-19 09:56:48 -0400
commit6a0bad8c0b7bdb261c0ee72b850bc727de6d019b (patch)
tree5ef7dd44a7973b31c764d2001c4121ff0cfe138e /tests/functional
parent1bbb32a5cffeff4875c4ed0566999cbee8919c86 (diff)
downloadforums-6a0bad8c0b7bdb261c0ee72b850bc727de6d019b.tar
forums-6a0bad8c0b7bdb261c0ee72b850bc727de6d019b.tar.gz
forums-6a0bad8c0b7bdb261c0ee72b850bc727de6d019b.tar.bz2
forums-6a0bad8c0b7bdb261c0ee72b850bc727de6d019b.tar.xz
forums-6a0bad8c0b7bdb261c0ee72b850bc727de6d019b.zip
[ticket/10586] Tests finally work (thanks naderman)
PHPBB3-10586
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/extension_controller_test.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index dd8aa1181b..263d48c034 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -19,20 +19,20 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
*/
static public function setUpBeforeClass()
{
+ global $phpbb_root_path;
parent::setUpBeforeClass();
- $f_path = self::$config['phpbb_functional_path'];
// these directories need to be created before the files can be copied
$directories = array(
- $f_path . 'ext/error/class/',
- $f_path . 'ext/error/classtype/',
- $f_path . 'ext/error/disabled/',
- $f_path . 'ext/foo/bar/',
- $f_path . 'ext/foo/bar/styles/prosilver/template/',
- $f_path . 'ext/foobar/',
- $f_path . 'ext/foobar/styles/prosilver/template/',
+ $phpbb_root_path . 'ext/error/class/',
+ $phpbb_root_path . 'ext/error/classtype/',
+ $phpbb_root_path . 'ext/error/disabled/',
+ $phpbb_root_path . 'ext/foo/bar/',
+ $phpbb_root_path . 'ext/foo/bar/styles/prosilver/template/',
+ $phpbb_root_path . 'ext/foobar/',
+ $phpbb_root_path . 'ext/foobar/styles/prosilver/template/',
);
- // When you add new tests that require new fixtures, add them to the array.
+
foreach ($directories as $dir)
{
if (!is_dir($dir))
@@ -58,8 +58,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
foreach ($fixtures as $fixture)
{
- // we have to use self::$config['phpbb_functional_url'] because $this->root_url is not available in static classes
- if(!copy("tests/functional/fixtures/ext/$fixture", "{$f_path}ext/$fixture"))
+ if(!copy("tests/functional/fixtures/ext/$fixture", "{$phpbb_root_path}ext/$fixture"))
{
echo 'Could not copy file ' . $fixture;
}
@@ -68,9 +67,9 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
public static function tearDownAfterClass()
{
- $f_path = self::$config['phpbb_functional_path'];
+ $phpbb_root_path = self::$config['phpbb_functional_path'];
- // @todo delete the fixtures from the $f_path board
+ // @todo delete the fixtures from the $phpbb_root_path board
// Note that it might be best to find a public domain function
// and port it into here instead of writing it from scratch
}