summaryrefslogtreecommitdiff
path: root/_testing/core/DokuWikiTest.php
diff options
context:
space:
mode:
authorTobias Sarnowski <sarnowski@cosmocode.de>2012-04-18 10:02:51 +0200
committerTobias Sarnowski <sarnowski@cosmocode.de>2012-04-18 10:02:51 +0200
commit96199bdf84b54d92069ce0779aad324599c2542e (patch)
tree441cdbbe9f9fe166e8f2e451bf504f64cad9614a /_testing/core/DokuWikiTest.php
parent1c35434449ba09b5d7e9f41a25b9a1525b273580 (diff)
downloadrpg-96199bdf84b54d92069ce0779aad324599c2542e.tar.gz
rpg-96199bdf84b54d92069ce0779aad324599c2542e.tar.bz2
finally updated phpdocs to reflect correct types
Diffstat (limited to '_testing/core/DokuWikiTest.php')
-rw-r--r--_testing/core/DokuWikiTest.php25
1 files changed, 19 insertions, 6 deletions
diff --git a/_testing/core/DokuWikiTest.php b/_testing/core/DokuWikiTest.php
index f464aab8e..e47c06329 100644
--- a/_testing/core/DokuWikiTest.php
+++ b/_testing/core/DokuWikiTest.php
@@ -4,17 +4,28 @@
*/
abstract class DokuWikiTest extends PHPUnit_Framework_TestCase {
- // tests can override this
+ /**
+ * tests can override this
+ *
+ * @var array plugins to enable for test class
+ */
protected $pluginsEnabled = array();
- // tests can override this
+
+ /**
+ * tests can override this
+ *
+ * @var array plugins to disable for test class
+ */
protected $pluginsDisabled = array();
/**
- * Reset the DokuWiki environment before each test run
+ * Reset the DokuWiki environment before each test run. Makes sure loaded config,
+ * language and plugins are correct.
*
- * Makes sure loaded config, language and plugins are correct
+ * @throws Exception if plugin actions fail
+ * @return void
*/
- function setUp() {
+ public function setUp() {
// reload config
global $conf, $config_cascade;
$conf = array();
@@ -53,7 +64,9 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase {
global $default_plugins;
foreach ($plugin_controller->getList() as $plugin) {
if (!in_array($plugin, $default_plugins)) {
- $plugin_controller->disable($plugin);
+ if (!$plugin_controller->disable($plugin)) {
+ throw new Exception('Could not disable plugin "'.$plugin.'"!');
+ }
}
}