diff options
author | Dominik Eckelmann <deckelmann@gmail.com> | 2012-11-29 14:59:46 +0100 |
---|---|---|
committer | Dominik Eckelmann <deckelmann@gmail.com> | 2012-11-29 14:59:46 +0100 |
commit | ff576d9309a9a8c229caea79f2f8509cc986eee4 (patch) | |
tree | ca1f6174af12d0e3cac894df10bcf5d35af35eba | |
parent | 3f6c460c29cccb4fdbbbbd14afbdd29916947221 (diff) | |
download | rpg-ff576d9309a9a8c229caea79f2f8509cc986eee4.tar.gz rpg-ff576d9309a9a8c229caea79f2f8509cc986eee4.tar.bz2 |
use correct setUp method and parent calls.
-rw-r--r-- | _test/tests/inc/auth_aclcheck.test.php | 10 | ||||
-rw-r--r-- | _test/tests/inc/auth_aclcheck_caseinsensitive.test.php | 9 | ||||
-rw-r--r-- | _test/tests/inc/auth_admincheck.test.php | 5 | ||||
-rw-r--r-- | _test/tests/inc/auth_nameencode.test.php | 2 | ||||
-rw-r--r-- | _test/tests/inc/parser/parser.inc.php | 3 | ||||
-rw-r--r-- | _test/tests/inc/parser/parser_footnote.test.php | 4 | ||||
-rw-r--r-- | _test/tests/inc/parser/parser_quotes.test.php | 4 | ||||
-rw-r--r-- | _test/tests/inc/remote.test.php | 5 |
8 files changed, 16 insertions, 26 deletions
diff --git a/_test/tests/inc/auth_aclcheck.test.php b/_test/tests/inc/auth_aclcheck.test.php index 991f82da7..8e5a04ff5 100644 --- a/_test/tests/inc/auth_aclcheck.test.php +++ b/_test/tests/inc/auth_aclcheck.test.php @@ -2,22 +2,18 @@ class auth_acl_test extends DokuWikiTest { - var $oldConf; var $oldAuthAcl; - function setup() { - global $conf; + function setUp() { + parent::setUp(); global $AUTH_ACL; global $auth; - $this->oldConf = $conf; $this->oldAuthAcl = $AUTH_ACL; $auth = new auth_basic(); } - function teardown() { - global $conf; + function tearDown() { global $AUTH_ACL; - $conf = $this->oldConf; $AUTH_ACL = $this->oldAuthAcl; } diff --git a/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php b/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php index 9f1fb6aa0..2f4821c2d 100644 --- a/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php +++ b/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php @@ -7,28 +7,25 @@ class auth_acl_caseinsensitive_auth extends auth_basic { } class auth_acl_caseinsensitive_test extends DokuWikiTest { - protected $oldConf; protected $oldAuth; protected $oldAuthAcl; - function setup() { - global $conf; + function setUp() { + parent::setUp(); global $auth; global $AUTH_ACL; - $this->oldConf = $conf; $this->oldAuth = $auth; $this->oldAuthAcl = $AUTH_ACL; $auth = new auth_acl_caseinsensitive_auth(); } - function teardown() { + function tearDown() { global $conf; global $AUTH_ACL; global $auth; - $conf = $this->oldConf; $auth = $this->oldAuth; $AUTH_ACL = $this->oldAuthAcl; } diff --git a/_test/tests/inc/auth_admincheck.test.php b/_test/tests/inc/auth_admincheck.test.php index d88399cbe..17424a08e 100644 --- a/_test/tests/inc/auth_admincheck.test.php +++ b/_test/tests/inc/auth_admincheck.test.php @@ -10,7 +10,8 @@ class auth_admin_test extends DokuWikiTest { private $oldauth; - function setup() { + function setUp() { + parent::setUp(); global $auth; $this->oldauth = $auth; } @@ -27,9 +28,7 @@ class auth_admin_test extends DokuWikiTest { function teardown() { global $auth; - global $conf; global $AUTH_ACL; - unset($conf); unset($AUTH_ACL); $auth = $this->oldauth; } diff --git a/_test/tests/inc/auth_nameencode.test.php b/_test/tests/inc/auth_nameencode.test.php index 21db304e0..da9f31f90 100644 --- a/_test/tests/inc/auth_nameencode.test.php +++ b/_test/tests/inc/auth_nameencode.test.php @@ -2,7 +2,7 @@ class auth_nameencode_test extends DokuWikiTest { - function teardown() { + function tearDown() { global $cache_authname; $cache_authname = array(); } diff --git a/_test/tests/inc/parser/parser.inc.php b/_test/tests/inc/parser/parser.inc.php index e9efef0d3..61f15678b 100644 --- a/_test/tests/inc/parser/parser.inc.php +++ b/_test/tests/inc/parser/parser.inc.php @@ -8,7 +8,8 @@ abstract class TestOfDoku_Parser extends PHPUnit_Framework_TestCase { var $P; var $H; - function setup() { + function setUp() { + parent::setUp(); $this->P = new Doku_Parser(); $this->H = new Doku_Handler(); $this->P->Handler = & $this->H; diff --git a/_test/tests/inc/parser/parser_footnote.test.php b/_test/tests/inc/parser/parser_footnote.test.php index f3b5ddf56..b47a575de 100644 --- a/_test/tests/inc/parser/parser_footnote.test.php +++ b/_test/tests/inc/parser/parser_footnote.test.php @@ -3,8 +3,8 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { - function setup() { - parent::setup(); + function setUp() { + parent::setUp(); $this->P->addMode('footnote',new Doku_Parser_Mode_Footnote()); } diff --git a/_test/tests/inc/parser/parser_quotes.test.php b/_test/tests/inc/parser/parser_quotes.test.php index b2dae1039..b82328212 100644 --- a/_test/tests/inc/parser/parser_quotes.test.php +++ b/_test/tests/inc/parser/parser_quotes.test.php @@ -3,8 +3,8 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { - function setup() { - parent::setup(); + function setUp() { + parent::setUp(); global $conf; $conf['typography'] = 2; } diff --git a/_test/tests/inc/remote.test.php b/_test/tests/inc/remote.test.php index 49152d8db..611e1ab0f 100644 --- a/_test/tests/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -112,12 +112,12 @@ class remote_plugin_testplugin extends DokuWiki_Remote_Plugin { class remote_test extends DokuWikiTest { - var $originalConf; var $userinfo; var $remote; function setUp() { + parent::setUp(); global $plugin_controller; global $conf; global $USERINFO; @@ -131,7 +131,6 @@ class remote_test extends DokuWikiTest { $plugin_controller = $pluginManager; - $this->originalConf = $conf; $conf['remote'] = 1; $conf['remoteuser'] = '!!not set!!'; $conf['useacl'] = 0; @@ -143,9 +142,7 @@ class remote_test extends DokuWikiTest { } function tearDown() { - global $conf; global $USERINFO; - $conf = $this->originalConf; $USERINFO = $this->userinfo; } |