diff options
author | Andreas Gohr <andi@splitbrain.org> | 2021-02-04 20:41:37 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2021-02-04 20:58:17 +0100 |
commit | 1c33cec37215d0c964cf961bdbc49ae7db3657e6 (patch) | |
tree | 70e53931ac1f4700112f485c055e7439b91cd07a | |
parent | bd9dab32dbf9956a33ffe2b84def740c0db664a4 (diff) | |
download | dokuwiki-1c33cec37215d0c964cf961bdbc49ae7db3657e6.tar.gz dokuwiki-1c33cec37215d0c964cf961bdbc49ae7db3657e6.zip |
add needed type hints for phpunit8
This will break a lot of plugin tests, but can't be avoided
51 files changed, 73 insertions, 73 deletions
diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index 25311bbac..68fd868f5 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -42,7 +42,7 @@ abstract class DokuWikiTest extends PHPUnit\Framework\TestCase { * * This is ran before each test class */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass() : void { // 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'); @@ -58,7 +58,7 @@ abstract class DokuWikiTest extends PHPUnit\Framework\TestCase { * @throws Exception if plugin actions fail * @return void */ - public function setUp() { + public function setUp() : void { // reload config global $conf, $config_cascade; diff --git a/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php b/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php index 3bc6a9c2f..9b2d230ad 100644 --- a/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php +++ b/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php @@ -12,7 +12,7 @@ class BulkSubscriptionsSenderTest extends DokuWikiTest private $originalSubscriptionConfig; - public function setUp() + public function setUp() : void { parent::setUp(); global $conf; @@ -20,7 +20,7 @@ class BulkSubscriptionsSenderTest extends DokuWikiTest $conf['subscribers'] = true; } - protected function tearDown() + protected function tearDown() : void { global $conf; $conf['subscribers'] = $this->originalSubscriptionConfig; diff --git a/_test/tests/inc/Subscriptions/SubscriberManagerTest.php b/_test/tests/inc/Subscriptions/SubscriberManagerTest.php index 1fcd7c84b..6c8b28fc4 100644 --- a/_test/tests/inc/Subscriptions/SubscriberManagerTest.php +++ b/_test/tests/inc/Subscriptions/SubscriberManagerTest.php @@ -9,7 +9,7 @@ class SubscriberManagerTest extends DokuWikiTest { private $originalSubscriptionConfig; - public function setUp() + public function setUp() : void { parent::setUp(); global $conf; @@ -17,7 +17,7 @@ class SubscriberManagerTest extends DokuWikiTest $conf['subscribers'] = true; } - protected function tearDown() + protected function tearDown() : void { global $conf; $conf['subscribers'] = $this->originalSubscriptionConfig; diff --git a/_test/tests/inc/XmlRpcServer.test.php b/_test/tests/inc/XmlRpcServer.test.php index 47d2f8cfc..6d5dffc76 100644 --- a/_test/tests/inc/XmlRpcServer.test.php +++ b/_test/tests/inc/XmlRpcServer.test.php @@ -15,7 +15,7 @@ class XmlRpcServerTest extends DokuWikiTest { protected $server; - function setUp() + function setUp () : void { parent::setUp(); global $conf; diff --git a/_test/tests/inc/auth_aclcheck.test.php b/_test/tests/inc/auth_aclcheck.test.php index 2b5342e43..c2acafbf8 100644 --- a/_test/tests/inc/auth_aclcheck.test.php +++ b/_test/tests/inc/auth_aclcheck.test.php @@ -6,7 +6,7 @@ class auth_acl_test extends DokuWikiTest { protected $oldAuthAcl; - function setUp() { + function setUp() : void { parent::setUp(); global $AUTH_ACL; global $auth; @@ -14,7 +14,7 @@ class auth_acl_test extends DokuWikiTest { $auth = new AuthPlugin(); } - function tearDown() { + function tearDown() : void { global $AUTH_ACL; $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 af0f17223..77264dc52 100644 --- a/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php +++ b/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php @@ -6,7 +6,7 @@ class auth_acl_caseinsensitive_test extends DokuWikiTest { protected $oldAuth; protected $oldAuthAcl; - function setUp() { + function setUp() : void { parent::setUp(); global $auth; global $AUTH_ACL; @@ -17,7 +17,7 @@ class auth_acl_caseinsensitive_test extends DokuWikiTest { $auth = new AuthCaseInsensitivePlugin(); } - function tearDown() { + function tearDown() : void { global $conf; global $AUTH_ACL; global $auth; diff --git a/_test/tests/inc/auth_admincheck.test.php b/_test/tests/inc/auth_admincheck.test.php index 718cd642f..ff9ca6e4f 100644 --- a/_test/tests/inc/auth_admincheck.test.php +++ b/_test/tests/inc/auth_admincheck.test.php @@ -8,7 +8,7 @@ class auth_admin_test extends DokuWikiTest private $oldauth; - function setUp() + function setUp() : void { parent::setUp(); global $auth; @@ -27,7 +27,7 @@ class auth_admin_test extends DokuWikiTest $auth = new AuthCaseInsensitivePlugin(); } - function teardown() + function tearDown() : void { global $auth; global $AUTH_ACL; diff --git a/_test/tests/inc/auth_loadacl.test.php b/_test/tests/inc/auth_loadacl.test.php index e8d9f6696..7fae2e90e 100644 --- a/_test/tests/inc/auth_loadacl.test.php +++ b/_test/tests/inc/auth_loadacl.test.php @@ -7,14 +7,14 @@ class auth_loadacl_test extends DokuWikiTest { - function setUp() { + function setUp() : void { global $USERINFO; parent::setUp(); $_SERVER['REMOTE_USER'] = 'testuser'; $USERINFO['grps'] = array('foo','bar'); } - function tearDown() { + function tearDown() : void { parent::tearDown(); } diff --git a/_test/tests/inc/auth_nameencode.test.php b/_test/tests/inc/auth_nameencode.test.php index 86db843d6..a41a4df76 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() : void { global $cache_authname; $cache_authname = array(); } diff --git a/_test/tests/inc/cache_use.test.php b/_test/tests/inc/cache_use.test.php index 3a1028d13..76e81a546 100644 --- a/_test/tests/inc/cache_use.test.php +++ b/_test/tests/inc/cache_use.test.php @@ -13,7 +13,7 @@ class cache_use_test extends DokuWikiTest { /** @var CacheRenderer $cache */ private $cache; - function setUp() { + function setUp() : void { global $ID, $conf; parent::setUp(); diff --git a/_test/tests/inc/changelog_getRevisionsAround.test.php b/_test/tests/inc/changelog_getRevisionsAround.test.php index ad6d3afcf..2504487cc 100644 --- a/_test/tests/inc/changelog_getRevisionsAround.test.php +++ b/_test/tests/inc/changelog_getRevisionsAround.test.php @@ -31,7 +31,7 @@ class changelog_getrevisionsaround_test extends DokuWikiTest { ); private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/changelog_getlastrevisionat.test.php b/_test/tests/inc/changelog_getlastrevisionat.test.php index cec54f6db..cf81ce042 100644 --- a/_test/tests/inc/changelog_getlastrevisionat.test.php +++ b/_test/tests/inc/changelog_getlastrevisionat.test.php @@ -14,7 +14,7 @@ class changelog_getlastrevisionat_test extends DokuWikiTest { private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/changelog_getrelativerevision.test.php b/_test/tests/inc/changelog_getrelativerevision.test.php index 49d7a0915..4268e702f 100644 --- a/_test/tests/inc/changelog_getrelativerevision.test.php +++ b/_test/tests/inc/changelog_getrelativerevision.test.php @@ -14,7 +14,7 @@ class changelog_getrelativerevision_test extends DokuWikiTest { private $logline = "1362525899 127.0.0.1 E mailinglist pubcie [Data entry] \n"; private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/changelog_getrevisioninfo.test.php b/_test/tests/inc/changelog_getrevisioninfo.test.php index 2d7ad131a..3decad0ef 100644 --- a/_test/tests/inc/changelog_getrevisioninfo.test.php +++ b/_test/tests/inc/changelog_getrevisioninfo.test.php @@ -15,7 +15,7 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest { private $firstlogline = "1374261194 127.0.0.1 E mailinglist pubcie \n"; private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/changelog_getrevisions.test.php b/_test/tests/inc/changelog_getrevisions.test.php index e29b80997..0bd378c3c 100644 --- a/_test/tests/inc/changelog_getrevisions.test.php +++ b/_test/tests/inc/changelog_getrevisions.test.php @@ -31,7 +31,7 @@ class changelog_getrevisions_test extends DokuWikiTest { ); private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/common_basicinfo.test.php b/_test/tests/inc/common_basicinfo.test.php index 1bcc1a0d5..bdb77087e 100644 --- a/_test/tests/inc/common_basicinfo.test.php +++ b/_test/tests/inc/common_basicinfo.test.php @@ -2,7 +2,7 @@ class common_infofunctions_test extends DokuWikiTest { - function setup(){ + function setup() : void { parent::setup(); global $USERINFO; diff --git a/_test/tests/inc/common_clientip.test.php b/_test/tests/inc/common_clientip.test.php index b06390ee4..a546d4faf 100644 --- a/_test/tests/inc/common_clientip.test.php +++ b/_test/tests/inc/common_clientip.test.php @@ -2,7 +2,7 @@ class common_clientIP_test extends DokuWikiTest { - function setup(){ + function setup() : void { parent::setup(); global $conf; diff --git a/_test/tests/inc/common_mediainfo.test.php b/_test/tests/inc/common_mediainfo.test.php index cc5b17ec7..685a36be9 100644 --- a/_test/tests/inc/common_mediainfo.test.php +++ b/_test/tests/inc/common_mediainfo.test.php @@ -1,8 +1,8 @@ <?php class common_basicinfo_test extends DokuWikiTest { - - function setup(){ + + function setup() : void { parent::setup(); global $USERINFO; diff --git a/_test/tests/inc/common_pageinfo.test.php b/_test/tests/inc/common_pageinfo.test.php index adc9538d2..47651240f 100644 --- a/_test/tests/inc/common_pageinfo.test.php +++ b/_test/tests/inc/common_pageinfo.test.php @@ -6,7 +6,7 @@ */ class common_pageinfo_test extends DokuWikiTest { - function setup(){ + function setup() : void { parent::setup(); global $USERINFO; diff --git a/_test/tests/inc/httpclient_https.test.php b/_test/tests/inc/httpclient_https.test.php index 0163501b2..f16f52e13 100644 --- a/_test/tests/inc/httpclient_https.test.php +++ b/_test/tests/inc/httpclient_https.test.php @@ -4,7 +4,7 @@ require_once dirname(__FILE__).'/httpclient_http.test.php'; class httpclient_https_test extends httpclient_http_test { protected $server = 'https://eu.httpbin.org/'; - public function setUp(){ + public function setUp() : void { // skip tests when this PHP has no SSL support $transports = stream_get_transports(); if(!in_array('ssl',$transports)){ diff --git a/_test/tests/inc/httpclient_https_proxy.test.php b/_test/tests/inc/httpclient_https_proxy.test.php index 2e9381d07..9ad0a3531 100644 --- a/_test/tests/inc/httpclient_https_proxy.test.php +++ b/_test/tests/inc/httpclient_https_proxy.test.php @@ -4,7 +4,7 @@ require_once dirname(__FILE__).'/httpclient_http_proxy.test.php'; class httpclient_https_proxy_test extends httpclient_http_proxy_test { protected $url = 'https://eu.httpbin.org/user-agent'; - public function setUp(){ + public function setUp() : void { // skip tests when this PHP has no SSL support $transports = stream_get_transports(); if(!in_array('ssl',$transports)){ diff --git a/_test/tests/inc/indexer_indexing.test.php b/_test/tests/inc/indexer_indexing.test.php index 3d4777f11..8c28cfb63 100644 --- a/_test/tests/inc/indexer_indexing.test.php +++ b/_test/tests/inc/indexer_indexing.test.php @@ -5,7 +5,7 @@ * @author Michael Hamann <michael@content-space.de> */ class indexer_indexing_test extends DokuWikiTest { - public function setUp() { + public function setUp() : void { parent::setUp(); saveWikiText('testpage', 'Foo bar baz.', 'Test initialization'); saveWikiText('notfound', 'Foon barn bazn.', 'Test initialization'); diff --git a/_test/tests/inc/indexer_rename.test.php b/_test/tests/inc/indexer_rename.test.php index 2dbe6dcad..97b51be2c 100644 --- a/_test/tests/inc/indexer_rename.test.php +++ b/_test/tests/inc/indexer_rename.test.php @@ -8,7 +8,7 @@ class indexer_rename_test extends DokuWikiTest { private $old_id = 'old_testid'; - function setUp() { + function setUp() : void { parent::setUp(); $this->indexer = idx_get_indexer(); $this->indexer->clear(); diff --git a/_test/tests/inc/media_searchlist.test.php b/_test/tests/inc/media_searchlist.test.php index b881ccc95..8b3e7c455 100644 --- a/_test/tests/inc/media_searchlist.test.php +++ b/_test/tests/inc/media_searchlist.test.php @@ -23,7 +23,7 @@ class media_searchlist_test extends DokuWikiTest { * * @throws Exception */ - function setUp() { + function setUp() : void { //create some files to search $png = mediaFN('wiki:kind_zu_katze.png'); $ogv = mediaFN('wiki:kind_zu_katze.ogv'); diff --git a/_test/tests/inc/pageutils_clean_id.test.php b/_test/tests/inc/pageutils_clean_id.test.php index 369e0b849..17d3a9ae1 100644 --- a/_test/tests/inc/pageutils_clean_id.test.php +++ b/_test/tests/inc/pageutils_clean_id.test.php @@ -4,7 +4,7 @@ class init_clean_id_test extends DokuWikiTest { /** @inheritDoc */ - function teardown() + function teardown() : void { global $cache_cleanid; $cache_cleanid = array(); diff --git a/_test/tests/inc/pageutils_findnearest.test.php b/_test/tests/inc/pageutils_findnearest.test.php index 55db44afa..4f97f5be9 100644 --- a/_test/tests/inc/pageutils_findnearest.test.php +++ b/_test/tests/inc/pageutils_findnearest.test.php @@ -6,7 +6,7 @@ class pageutils_findnearest_test extends DokuWikiTest { protected $oldAuthAcl; - function setUp() { + function setUp() : void { parent::setUp(); global $AUTH_ACL; global $auth; @@ -25,7 +25,7 @@ class pageutils_findnearest_test extends DokuWikiTest { ); } - function tearDown() { + function tearDown() : void { global $AUTH_ACL; $AUTH_ACL = $this->oldAuthAcl; } diff --git a/_test/tests/inc/parser/parser.inc.php b/_test/tests/inc/parser/parser.inc.php index 153f67b26..f0d141eb9 100644 --- a/_test/tests/inc/parser/parser.inc.php +++ b/_test/tests/inc/parser/parser.inc.php @@ -13,13 +13,13 @@ abstract class TestOfDoku_Parser extends DokuWikiTest { /** @var Doku_Handler */ protected $H; - function setUp() { + function setUp() : void { parent::setUp(); $this->H = new Doku_Handler(); $this->P = new Parser($this->H); } - function tearDown() { + function tearDown() : void { unset($this->P); unset($this->H); } diff --git a/_test/tests/inc/parser/parser_code.test.php b/_test/tests/inc/parser/parser_code.test.php index 961db7dd2..c700ed10a 100644 --- a/_test/tests/inc/parser/parser_code.test.php +++ b/_test/tests/inc/parser/parser_code.test.php @@ -11,7 +11,7 @@ require_once 'parser.inc.php'; */ class TestOfDoku_Parser_Code extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); $this->P->addMode('code',new Code()); } diff --git a/_test/tests/inc/parser/parser_file.test.php b/_test/tests/inc/parser/parser_file.test.php index 407b04a48..23aa8ef5b 100644 --- a/_test/tests/inc/parser/parser_file.test.php +++ b/_test/tests/inc/parser/parser_file.test.php @@ -6,7 +6,7 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_File extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); $this->P->addMode('file',new File()); } diff --git a/_test/tests/inc/parser/parser_footnote.test.php b/_test/tests/inc/parser/parser_footnote.test.php index 96d7a8407..d7b78cb64 100644 --- a/_test/tests/inc/parser/parser_footnote.test.php +++ b/_test/tests/inc/parser/parser_footnote.test.php @@ -16,7 +16,7 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); $this->P->addMode('footnote',new Footnote()); } diff --git a/_test/tests/inc/parser/parser_quotes.test.php b/_test/tests/inc/parser/parser_quotes.test.php index fb192d21f..73291c201 100644 --- a/_test/tests/inc/parser/parser_quotes.test.php +++ b/_test/tests/inc/parser/parser_quotes.test.php @@ -6,7 +6,7 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); global $conf; $conf['typography'] = 2; diff --git a/_test/tests/inc/parser/renderer_metadata.test.php b/_test/tests/inc/parser/renderer_metadata.test.php index 5498d6f1f..cdfe31689 100644 --- a/_test/tests/inc/parser/renderer_metadata.test.php +++ b/_test/tests/inc/parser/renderer_metadata.test.php @@ -12,12 +12,12 @@ class renderer_metadata_test extends DokuWikiTest { * * @throws Exception */ - function setUp() { + function setUp() : void { parent::setUp(); $this->R = new Doku_Renderer_metadata(); } - function tearDown() { + function tearDown() : void { unset($this->R); } diff --git a/_test/tests/inc/parser/renderer_xhtml.test.php b/_test/tests/inc/parser/renderer_xhtml.test.php index 9b635c604..44fe48854 100644 --- a/_test/tests/inc/parser/renderer_xhtml.test.php +++ b/_test/tests/inc/parser/renderer_xhtml.test.php @@ -14,12 +14,12 @@ class renderer_xhtml_test extends DokuWikiTest { * * @throws Exception */ - function setUp() { + function setUp() : void { parent::setUp(); $this->R = new Doku_Renderer_xhtml(); } - function tearDown() { + function tearDown() : void { unset($this->R); } diff --git a/_test/tests/inc/remote.test.php b/_test/tests/inc/remote.test.php index 7f1ec4aff..8dc1d5fb0 100644 --- a/_test/tests/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -135,7 +135,7 @@ class remote_test extends DokuWikiTest { /** @var Api */ protected $remote; - function setUp() { + function setUp() : void { parent::setUp(); global $plugin_controller; global $conf; @@ -168,7 +168,7 @@ class remote_test extends DokuWikiTest { $auth = new AuthPlugin(); } - function tearDown() { + function tearDown() : void { global $USERINFO; $USERINFO = $this->userinfo; diff --git a/_test/tests/inc/remoteapicore.test.php b/_test/tests/inc/remoteapicore.test.php index e152d4ac5..06b0d92c6 100644 --- a/_test/tests/inc/remoteapicore.test.php +++ b/_test/tests/inc/remoteapicore.test.php @@ -15,7 +15,7 @@ class remoteapicore_test extends DokuWikiTest { /** @var Api */ protected $remote; - public function setUp() { + public function setUp() : void { // we need a clean setup before each single test: DokuWikiTest::setUpBeforeClass(); @@ -35,7 +35,7 @@ class remoteapicore_test extends DokuWikiTest { $this->remote = new Api(); } - public function tearDown() { + public function tearDown() : void { parent::tearDown(); global $USERINFO; diff --git a/_test/tests/inc/remoteapicore_aclcheck.test.php b/_test/tests/inc/remoteapicore_aclcheck.test.php index 6ba7f1dcf..1e34b5427 100644 --- a/_test/tests/inc/remoteapicore_aclcheck.test.php +++ b/_test/tests/inc/remoteapicore_aclcheck.test.php @@ -21,7 +21,7 @@ class remoteapicore_aclcheck_test extends DokuWikiTest { $auth = new auth_plugin_authplain(); } - public function setUp() { + public function setUp() : void { global $config_cascade; global $conf; global $USERINFO; @@ -44,7 +44,7 @@ class remoteapicore_aclcheck_test extends DokuWikiTest { } - public function tearDown() { + public function tearDown() : void { global $USERINFO; global $AUTH_ACL; global $config_cascade; diff --git a/_test/tests/inc/sort_without_collator.test.php b/_test/tests/inc/sort_without_collator.test.php index e64cfb69e..f882a67e8 100644 --- a/_test/tests/inc/sort_without_collator.test.php +++ b/_test/tests/inc/sort_without_collator.test.php @@ -15,7 +15,7 @@ class sort_without_collator_test extends sort_with_collator_test /** * Disable the "intl" extension. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass() : void { parent::setUpBeforeClass(); Sort::useIntl(false); @@ -24,7 +24,7 @@ class sort_without_collator_test extends sort_with_collator_test /** * Reenable the "intl" extension. */ - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { Sort::useIntl(true); parent::tearDownAfterClass(); diff --git a/_test/tests/inc/template_tpl_get_action.php b/_test/tests/inc/template_tpl_get_action.php index b18fe552d..1fc3bcbf2 100644 --- a/_test/tests/inc/template_tpl_get_action.php +++ b/_test/tests/inc/template_tpl_get_action.php @@ -2,7 +2,7 @@ class template_tpl_get_action_test extends DokuWikiTest { - public function setUp() { + public function setUp() : void { parent::setUp(); global $ID; $ID = 'start'; // run all tests on the start page diff --git a/_test/tests/lib/exe/css_at_import_less.test.php b/_test/tests/lib/exe/css_at_import_less.test.php index 759272ebf..9eaab33d6 100644 --- a/_test/tests/lib/exe/css_at_import_less.test.php +++ b/_test/tests/lib/exe/css_at_import_less.test.php @@ -80,7 +80,7 @@ content: @foo;'; $this->csstest($in_css, $expected_css, $expected_less); } - public function tearDown() { + public function tearDown() : void { unlink($this->file); unlink($this->import); unset($this->file, $this->import); diff --git a/_test/tests/lib/exe/css_css_loadfile.test.php b/_test/tests/lib/exe/css_css_loadfile.test.php index 2b9d1fd2a..5c8af93ae 100644 --- a/_test/tests/lib/exe/css_css_loadfile.test.php +++ b/_test/tests/lib/exe/css_css_loadfile.test.php @@ -6,7 +6,7 @@ class css_css_loadfile_test extends DokuWikiTest { protected $file = ''; - public function setUp() { + public function setUp() : void { $this->file = tempnam(TMP_DIR, 'css'); } @@ -90,7 +90,7 @@ class css_css_loadfile_test extends DokuWikiTest { } } - public function tearDown() { + public function tearDown() : void { unlink($this->file); unset($this->file); } diff --git a/_test/tests/lib/exe/fetch_imagetoken.test.php b/_test/tests/lib/exe/fetch_imagetoken.test.php index 99e642557..c3371ca71 100644 --- a/_test/tests/lib/exe/fetch_imagetoken.test.php +++ b/_test/tests/lib/exe/fetch_imagetoken.test.php @@ -1,12 +1,12 @@ <?php class fetch_imagetoken_test extends DokuWikiTest { - + private $media = 'wiki:dokuwiki-128.png'; private $width = 200; private $height = 0; - function setUp() { + function setUp() : void { // check we can carry out these tests if (!file_exists(mediaFN($this->media))) { $this->markTestSkipped('Source image required for test'); diff --git a/_test/tests/lib/exe/fetch_statuscodes_external.test.php b/_test/tests/lib/exe/fetch_statuscodes_external.test.php index 79a45ec93..09b09b3ce 100644 --- a/_test/tests/lib/exe/fetch_statuscodes_external.test.php +++ b/_test/tests/lib/exe/fetch_statuscodes_external.test.php @@ -9,7 +9,7 @@ class fetch_statuscodes_external_test extends DokuWikiTest { private $width = 200; private $height = 0; - function setUp() { + function setUp() : void { header('X-Test: check headers working'); $header_check = function_exists('xdebug_get_headers') ? xdebug_get_headers() : headers_list(); diff --git a/_test/tests/test/plugins.test.php b/_test/tests/test/plugins.test.php index ac6d1ee45..03f3c526e 100644 --- a/_test/tests/test/plugins.test.php +++ b/_test/tests/test/plugins.test.php @@ -5,7 +5,7 @@ */ class InttestsPluginsTest extends DokuWikiTest { - function setUp() { + function setUp() : void { $this->pluginsEnabled = array( 'testing' ); diff --git a/lib/plugins/authpdo/_test/mysql.test.php b/lib/plugins/authpdo/_test/mysql.test.php index 8cd14189b..35a76baf5 100644 --- a/lib/plugins/authpdo/_test/mysql.test.php +++ b/lib/plugins/authpdo/_test/mysql.test.php @@ -15,7 +15,7 @@ class mysql_plugin_authpdo_test extends DokuWikiTest { protected $pass = ''; protected $port = ''; - public function setUp() { + public function setUp() : void { parent::setUp(); $configuration = DOKU_UNITTEST . "{$this->driver}.conf.php"; if(!file_exists($configuration)) { @@ -34,7 +34,7 @@ class mysql_plugin_authpdo_test extends DokuWikiTest { * * it might still be there if something went wrong */ - public function tearDown() { + public function tearDown() : void { parent::tearDown(); $this->dropDatabase(); } diff --git a/lib/plugins/authpdo/_test/sqlite.test.php b/lib/plugins/authpdo/_test/sqlite.test.php index 89cc9f60d..58fcadcb8 100644 --- a/lib/plugins/authpdo/_test/sqlite.test.php +++ b/lib/plugins/authpdo/_test/sqlite.test.php @@ -36,7 +36,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { $this->assertTrue(true); // avoid being marked as risky for having no assertion } - public function setUp() { + public function setUp() : void { parent::setUp(); $this->dbfile = tempnam('/tmp/', 'pluginpdo_test_'); copy(__DIR__ . '/test.sqlite3', $this->dbfile); @@ -85,7 +85,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { $conf['plugin']['authpdo']['leave-group'] = 'DELETE FROM member WHERE uid = :uid AND gid = :gid'; } - public function tearDown() { + public function tearDown() : void { parent::tearDown(); unlink($this->dbfile); } diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index be4d06b4e..58f1025d7 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -24,7 +24,7 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest { $this->auth = new auth_plugin_authplainharness(); } - function setUp() { + function setUp() : void { global $config_cascade; parent::setUp(); $name = $config_cascade['plainauth.users']['default']; @@ -32,7 +32,7 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest { $this->reloadUsers(); } - function tearDown() { + function tearDown() : void { global $config_cascade; parent::tearDown(); $name = $config_cascade['plainauth.users']['default']; diff --git a/lib/plugins/authplain/_test/userdata.test.php b/lib/plugins/authplain/_test/userdata.test.php index b80b39349..9460c1919 100644 --- a/lib/plugins/authplain/_test/userdata.test.php +++ b/lib/plugins/authplain/_test/userdata.test.php @@ -16,7 +16,7 @@ class userdata_test extends DokuWikiTest * Load auth with test conf * @throws Exception */ - public function setUp() + public function setUp() : void { parent::setUp(); global $config_cascade; diff --git a/lib/plugins/config/_test/Setting/AbstractSettingTest.php b/lib/plugins/config/_test/Setting/AbstractSettingTest.php index d18f0ec17..55e53c4fe 100644 --- a/lib/plugins/config/_test/Setting/AbstractSettingTest.php +++ b/lib/plugins/config/_test/Setting/AbstractSettingTest.php @@ -13,7 +13,7 @@ abstract class AbstractSettingTest extends \DokuWikiTest { * Sets up the proper class to test based on the test's class name * @throws \Exception */ - public function setUp() { + public function setUp() : void { parent::setUp(); $class = get_class($this); $class = substr($class, strrpos($class, '\\') + 1, -4); diff --git a/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php b/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php index 5982c6933..f8054755c 100644 --- a/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php +++ b/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php @@ -5,7 +5,7 @@ */ class TestingDummyPluginIntegrationTest extends DokuWikiTest { - function setUp() { + function setUp() : void { $this->pluginsEnabled = array( 'testing' ); diff --git a/lib/plugins/usermanager/_test/csv_export.test.php b/lib/plugins/usermanager/_test/csv_export.test.php index 667fc71dc..96f9eb28c 100644 --- a/lib/plugins/usermanager/_test/csv_export.test.php +++ b/lib/plugins/usermanager/_test/csv_export.test.php @@ -12,7 +12,7 @@ class plugin_usermanager_csv_export_test extends DokuWikiTest { protected $usermanager; - function setUp() { + function setUp() : void { $this->usermanager = new admin_mock_usermanager(); parent::setUp(); } diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php index 13034a012..9cf23eb8d 100644 --- a/lib/plugins/usermanager/_test/csv_import.test.php +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -20,7 +20,7 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest protected $usermanager; protected $importfile; - public function setUp() + public function setUp() : void { $this->importfile = tempnam(TMP_DIR, 'csv'); @@ -39,7 +39,7 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest parent::setUp(); } - public function tearDown() + public function tearDown() : void { $_FILES = $this->old_files; parent::tearDown(); |