diff options
author | Martin Doucha <next_ghost@quick.cz> | 2012-07-06 14:02:10 +0200 |
---|---|---|
committer | Martin Doucha <next_ghost@quick.cz> | 2012-07-06 14:02:10 +0200 |
commit | 27849ebfc6b61fbb42ec6deb9c99ff548c40b4ac (patch) | |
tree | 5c231dfd7978a65522f56fd3be29bfe9679a64a7 /_test/core/DokuWikiTest.php | |
parent | 3fb0e07d018fc6c8d173bd4a8a58c77ba00290fb (diff) | |
parent | 4ba05e11e88dd654689b0f6333b1427e03d1b0fe (diff) | |
download | rpg-27849ebfc6b61fbb42ec6deb9c99ff548c40b4ac.tar.gz rpg-27849ebfc6b61fbb42ec6deb9c99ff548c40b4ac.tar.bz2 |
Merge branch 'master' of git://github.com/splitbrain/dokuwiki
Diffstat (limited to '_test/core/DokuWikiTest.php')
-rw-r--r-- | _test/core/DokuWikiTest.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index e47c06329..e51f1eeb1 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -19,6 +19,25 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { protected $pluginsDisabled = array(); /** + * Setup the data directory + * + * This is ran before each test class + */ + public static function setUpBeforeClass() { + // just to be safe not to delete something undefined later + if(!defined('TMP_DIR')) die('no temporary directory'); + if(!defined('DOKU_TMP_DATA')) die('no temporary data directory'); + + // remove any leftovers from the last run + if(is_dir(DOKU_TMP_DATA)){ + TestUtils::rdelete(DOKU_TMP_DATA); + } + + // populate default dirs + TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/../data/'); + } + + /** * Reset the DokuWiki environment before each test run. Makes sure loaded config, * language and plugins are correct. * @@ -26,6 +45,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { * @return void */ public function setUp() { + // reload config global $conf, $config_cascade; $conf = array(); |