From 96199bdf84b54d92069ce0779aad324599c2542e Mon Sep 17 00:00:00 2001 From: Tobias Sarnowski Date: Wed, 18 Apr 2012 10:02:51 +0200 Subject: finally updated phpdocs to reflect correct types --- _testing/core/DokuWikiTest.php | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to '_testing/core/DokuWikiTest.php') 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.'"!'); + } } } -- cgit v1.2.3