aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-03-16 15:35:01 -0400
committerDavid King <imkingdavid@gmail.com>2012-03-19 09:12:33 -0400
commit7b44d6f21a5a8be289bf6810f2c38d580647581e (patch)
treefe80a793e8ae38b5214affa480f4121c3514d90e
parentd235262bc21657f0693501ac1154e1443578d507 (diff)
downloadforums-7b44d6f21a5a8be289bf6810f2c38d580647581e.tar
forums-7b44d6f21a5a8be289bf6810f2c38d580647581e.tar.gz
forums-7b44d6f21a5a8be289bf6810f2c38d580647581e.tar.bz2
forums-7b44d6f21a5a8be289bf6810f2c38d580647581e.tar.xz
forums-7b44d6f21a5a8be289bf6810f2c38d580647581e.zip
[ticket/10586] initial work on copying fixtures. Note that this depends on 10706
PHPBB3-10586
-rw-r--r--tests/functional/extension_controller_test.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index 7e50eb7d91..b52174bbd5 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -12,6 +12,39 @@
*/
class phpbb_functional_extension_controller_test extends phpbb_functional_test_case
{
+ /**
+ * 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()
+ {
+ parent::setUpBeforeClass();
+ // When you add new tests that require new fixtures, add them to the array.
+ $fixtures = array(
+ 'error/class/controller.php',
+ 'error/class/ext.php',
+ 'error/classtype/controller.php',
+ 'error/classtype/ext.php',
+ 'error/disabled/controller.php',
+ 'error/disabled/ext.php',
+ 'foo/bar/controller.php',
+ 'foo/bar/ext.php',
+ 'foo/bar/styles/prosilver/template/index_body.html',
+ 'foobar/controller.php',
+ 'foobar/ext.php',
+ 'foobar/styles/prosilver/template/index_body.html',
+ );
+
+ 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", self::$config['phpbb_functional_url'] . "/ext/$fixture"))
+ {
+ echo 'Could not copy file ' . $fixture;
+ }
+ }
+ }
+
public function setUp()
{
parent::setUp();