diff options
47 files changed, 72 insertions, 72 deletions
diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php index 15388970..57359196 100644 --- a/tests/ApplicationUtilsTest.php +++ b/tests/ApplicationUtilsTest.php | |||
@@ -17,7 +17,7 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase | |||
17 | /** | 17 | /** |
18 | * Reset test data for each test | 18 | * Reset test data for each test |
19 | */ | 19 | */ |
20 | public function setUp() | 20 | protected function setUp(): void |
21 | { | 21 | { |
22 | FakeApplicationUtils::$VERSION_CODE = ''; | 22 | FakeApplicationUtils::$VERSION_CODE = ''; |
23 | if (file_exists(self::$testUpdateFile)) { | 23 | if (file_exists(self::$testUpdateFile)) { |
@@ -28,7 +28,7 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase | |||
28 | /** | 28 | /** |
29 | * Remove test version file if it exists | 29 | * Remove test version file if it exists |
30 | */ | 30 | */ |
31 | public function tearDown() | 31 | protected function tearDown(): void |
32 | { | 32 | { |
33 | if (is_file('sandbox/version.php')) { | 33 | if (is_file('sandbox/version.php')) { |
34 | unlink('sandbox/version.php'); | 34 | unlink('sandbox/version.php'); |
diff --git a/tests/FileUtilsTest.php b/tests/FileUtilsTest.php index 57719175..eb9cb89a 100644 --- a/tests/FileUtilsTest.php +++ b/tests/FileUtilsTest.php | |||
@@ -19,7 +19,7 @@ class FileUtilsTest extends \PHPUnit\Framework\TestCase | |||
19 | /** | 19 | /** |
20 | * Delete test file after every test. | 20 | * Delete test file after every test. |
21 | */ | 21 | */ |
22 | public function tearDown() | 22 | protected function tearDown(): void |
23 | { | 23 | { |
24 | @unlink(self::$file); | 24 | @unlink(self::$file); |
25 | } | 25 | } |
diff --git a/tests/HistoryTest.php b/tests/HistoryTest.php index 7189c3a9..e9e61032 100644 --- a/tests/HistoryTest.php +++ b/tests/HistoryTest.php | |||
@@ -16,7 +16,7 @@ class HistoryTest extends \PHPUnit\Framework\TestCase | |||
16 | /** | 16 | /** |
17 | * Delete history file. | 17 | * Delete history file. |
18 | */ | 18 | */ |
19 | public function setUp() | 19 | protected function setUp(): void |
20 | { | 20 | { |
21 | if (file_exists(self::$historyFilePath)) { | 21 | if (file_exists(self::$historyFilePath)) { |
22 | unlink(self::$historyFilePath); | 22 | unlink(self::$historyFilePath); |
diff --git a/tests/LanguagesTest.php b/tests/LanguagesTest.php index de83f291..914179c8 100644 --- a/tests/LanguagesTest.php +++ b/tests/LanguagesTest.php | |||
@@ -22,7 +22,7 @@ class LanguagesTest extends \PHPUnit\Framework\TestCase | |||
22 | /** | 22 | /** |
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | public function setUp() | 25 | protected function setUp(): void |
26 | { | 26 | { |
27 | $this->conf = new ConfigManager(self::$configFile); | 27 | $this->conf = new ConfigManager(self::$configFile); |
28 | } | 28 | } |
diff --git a/tests/ThumbnailerTest.php b/tests/ThumbnailerTest.php index c01849f7..5b6d6a4d 100644 --- a/tests/ThumbnailerTest.php +++ b/tests/ThumbnailerTest.php | |||
@@ -30,7 +30,7 @@ class ThumbnailerTest extends TestCase | |||
30 | */ | 30 | */ |
31 | protected $conf; | 31 | protected $conf; |
32 | 32 | ||
33 | public function setUp() | 33 | protected function setUp(): void |
34 | { | 34 | { |
35 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 35 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
36 | $this->conf->set('thumbnails.mode', Thumbnailer::MODE_ALL); | 36 | $this->conf->set('thumbnails.mode', Thumbnailer::MODE_ALL); |
@@ -43,7 +43,7 @@ class ThumbnailerTest extends TestCase | |||
43 | WTConfigManager::addFile('tests/utils/config/wt.json'); | 43 | WTConfigManager::addFile('tests/utils/config/wt.json'); |
44 | } | 44 | } |
45 | 45 | ||
46 | public function tearDown() | 46 | protected function tearDown(): void |
47 | { | 47 | { |
48 | $this->rrmdirContent('sandbox/'); | 48 | $this->rrmdirContent('sandbox/'); |
49 | } | 49 | } |
diff --git a/tests/TimeZoneTest.php b/tests/TimeZoneTest.php index 02bf060f..d3d9aeeb 100644 --- a/tests/TimeZoneTest.php +++ b/tests/TimeZoneTest.php | |||
@@ -15,7 +15,7 @@ class TimeZoneTest extends PHPUnit\Framework\TestCase | |||
15 | */ | 15 | */ |
16 | protected $installedTimezones; | 16 | protected $installedTimezones; |
17 | 17 | ||
18 | public function setUp() | 18 | protected function setUp(): void |
19 | { | 19 | { |
20 | $this->installedTimezones = [ | 20 | $this->installedTimezones = [ |
21 | 'Antarctica/Syowa', | 21 | 'Antarctica/Syowa', |
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index 26d2a6b8..93b77539 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php | |||
@@ -26,7 +26,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase | |||
26 | /** | 26 | /** |
27 | * Assign reference data | 27 | * Assign reference data |
28 | */ | 28 | */ |
29 | public static function setUpBeforeClass() | 29 | public static function setUpBeforeClass(): void |
30 | { | 30 | { |
31 | self::$defaultTimeZone = date_default_timezone_get(); | 31 | self::$defaultTimeZone = date_default_timezone_get(); |
32 | // Timezone without DST for test consistency | 32 | // Timezone without DST for test consistency |
@@ -36,7 +36,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase | |||
36 | /** | 36 | /** |
37 | * Reset the timezone | 37 | * Reset the timezone |
38 | */ | 38 | */ |
39 | public static function tearDownAfterClass() | 39 | public static function tearDownAfterClass(): void |
40 | { | 40 | { |
41 | date_default_timezone_set(self::$defaultTimeZone); | 41 | date_default_timezone_set(self::$defaultTimeZone); |
42 | } | 42 | } |
@@ -44,7 +44,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase | |||
44 | /** | 44 | /** |
45 | * Resets test data before each test | 45 | * Resets test data before each test |
46 | */ | 46 | */ |
47 | protected function setUp() | 47 | protected function setUp(): void |
48 | { | 48 | { |
49 | if (file_exists(self::$testLogFile)) { | 49 | if (file_exists(self::$testLogFile)) { |
50 | unlink(self::$testLogFile); | 50 | unlink(self::$testLogFile); |
diff --git a/tests/api/ApiMiddlewareTest.php b/tests/api/ApiMiddlewareTest.php index df2fb33a..b157e4a7 100644 --- a/tests/api/ApiMiddlewareTest.php +++ b/tests/api/ApiMiddlewareTest.php | |||
@@ -43,7 +43,7 @@ class ApiMiddlewareTest extends \PHPUnit\Framework\TestCase | |||
43 | /** | 43 | /** |
44 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 44 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
45 | */ | 45 | */ |
46 | public function setUp() | 46 | protected function setUp(): void |
47 | { | 47 | { |
48 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 48 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
49 | $this->conf->set('api.secret', 'NapoleonWasALizard'); | 49 | $this->conf->set('api.secret', 'NapoleonWasALizard'); |
@@ -61,7 +61,7 @@ class ApiMiddlewareTest extends \PHPUnit\Framework\TestCase | |||
61 | /** | 61 | /** |
62 | * After every test, remove the test datastore. | 62 | * After every test, remove the test datastore. |
63 | */ | 63 | */ |
64 | public function tearDown() | 64 | protected function tearDown(): void |
65 | { | 65 | { |
66 | @unlink(self::$testDatastore); | 66 | @unlink(self::$testDatastore); |
67 | } | 67 | } |
diff --git a/tests/api/ApiUtilsTest.php b/tests/api/ApiUtilsTest.php index 7efec9bb..e8075a5d 100644 --- a/tests/api/ApiUtilsTest.php +++ b/tests/api/ApiUtilsTest.php | |||
@@ -13,7 +13,7 @@ class ApiUtilsTest extends \PHPUnit\Framework\TestCase | |||
13 | /** | 13 | /** |
14 | * Force the timezone for ISO datetimes. | 14 | * Force the timezone for ISO datetimes. |
15 | */ | 15 | */ |
16 | public static function setUpBeforeClass() | 16 | public static function setUpBeforeClass(): void |
17 | { | 17 | { |
18 | date_default_timezone_set('UTC'); | 18 | date_default_timezone_set('UTC'); |
19 | } | 19 | } |
diff --git a/tests/api/controllers/history/HistoryTest.php b/tests/api/controllers/history/HistoryTest.php index f4d3b646..40f26b12 100644 --- a/tests/api/controllers/history/HistoryTest.php +++ b/tests/api/controllers/history/HistoryTest.php | |||
@@ -41,7 +41,7 @@ class HistoryTest extends \PHPUnit\Framework\TestCase | |||
41 | /** | 41 | /** |
42 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 42 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
43 | */ | 43 | */ |
44 | public function setUp() | 44 | protected function setUp(): void |
45 | { | 45 | { |
46 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 46 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
47 | $this->refHistory = new \ReferenceHistory(); | 47 | $this->refHistory = new \ReferenceHistory(); |
@@ -57,7 +57,7 @@ class HistoryTest extends \PHPUnit\Framework\TestCase | |||
57 | /** | 57 | /** |
58 | * After every test, remove the test datastore. | 58 | * After every test, remove the test datastore. |
59 | */ | 59 | */ |
60 | public function tearDown() | 60 | protected function tearDown(): void |
61 | { | 61 | { |
62 | @unlink(self::$testHistory); | 62 | @unlink(self::$testHistory); |
63 | } | 63 | } |
diff --git a/tests/api/controllers/info/InfoTest.php b/tests/api/controllers/info/InfoTest.php index b5c938e1..cc50d2e3 100644 --- a/tests/api/controllers/info/InfoTest.php +++ b/tests/api/controllers/info/InfoTest.php | |||
@@ -47,7 +47,7 @@ class InfoTest extends TestCase | |||
47 | /** | 47 | /** |
48 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 48 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
49 | */ | 49 | */ |
50 | public function setUp() | 50 | protected function setUp(): void |
51 | { | 51 | { |
52 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 52 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
53 | $this->conf->set('resource.datastore', self::$testDatastore); | 53 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -67,7 +67,7 @@ class InfoTest extends TestCase | |||
67 | /** | 67 | /** |
68 | * After every test, remove the test datastore. | 68 | * After every test, remove the test datastore. |
69 | */ | 69 | */ |
70 | public function tearDown() | 70 | protected function tearDown(): void |
71 | { | 71 | { |
72 | @unlink(self::$testDatastore); | 72 | @unlink(self::$testDatastore); |
73 | } | 73 | } |
diff --git a/tests/api/controllers/links/DeleteLinkTest.php b/tests/api/controllers/links/DeleteLinkTest.php index 6c2b3698..10dfe8bc 100644 --- a/tests/api/controllers/links/DeleteLinkTest.php +++ b/tests/api/controllers/links/DeleteLinkTest.php | |||
@@ -56,7 +56,7 @@ class DeleteLinkTest extends \PHPUnit\Framework\TestCase | |||
56 | /** | 56 | /** |
57 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. | 57 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. |
58 | */ | 58 | */ |
59 | public function setUp() | 59 | protected function setUp(): void |
60 | { | 60 | { |
61 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 61 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
62 | $this->conf->set('resource.datastore', self::$testDatastore); | 62 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -78,7 +78,7 @@ class DeleteLinkTest extends \PHPUnit\Framework\TestCase | |||
78 | /** | 78 | /** |
79 | * After each test, remove the test datastore. | 79 | * After each test, remove the test datastore. |
80 | */ | 80 | */ |
81 | public function tearDown() | 81 | protected function tearDown(): void |
82 | { | 82 | { |
83 | @unlink(self::$testDatastore); | 83 | @unlink(self::$testDatastore); |
84 | @unlink(self::$testHistory); | 84 | @unlink(self::$testHistory); |
diff --git a/tests/api/controllers/links/GetLinkIdTest.php b/tests/api/controllers/links/GetLinkIdTest.php index 8bb81dc8..ee42e259 100644 --- a/tests/api/controllers/links/GetLinkIdTest.php +++ b/tests/api/controllers/links/GetLinkIdTest.php | |||
@@ -55,7 +55,7 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase | |||
55 | /** | 55 | /** |
56 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. | 56 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. |
57 | */ | 57 | */ |
58 | public function setUp() | 58 | protected function setUp(): void |
59 | { | 59 | { |
60 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 60 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
61 | $this->conf->set('resource.datastore', self::$testDatastore); | 61 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -74,7 +74,7 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase | |||
74 | /** | 74 | /** |
75 | * After each test, remove the test datastore. | 75 | * After each test, remove the test datastore. |
76 | */ | 76 | */ |
77 | public function tearDown() | 77 | protected function tearDown(): void |
78 | { | 78 | { |
79 | @unlink(self::$testDatastore); | 79 | @unlink(self::$testDatastore); |
80 | } | 80 | } |
diff --git a/tests/api/controllers/links/GetLinksTest.php b/tests/api/controllers/links/GetLinksTest.php index d02e6fad..01c40c2f 100644 --- a/tests/api/controllers/links/GetLinksTest.php +++ b/tests/api/controllers/links/GetLinksTest.php | |||
@@ -55,7 +55,7 @@ class GetLinksTest extends \PHPUnit\Framework\TestCase | |||
55 | /** | 55 | /** |
56 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 56 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
57 | */ | 57 | */ |
58 | public function setUp() | 58 | protected function setUp(): void |
59 | { | 59 | { |
60 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 60 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
61 | $this->conf->set('resource.datastore', self::$testDatastore); | 61 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -74,7 +74,7 @@ class GetLinksTest extends \PHPUnit\Framework\TestCase | |||
74 | /** | 74 | /** |
75 | * After every test, remove the test datastore. | 75 | * After every test, remove the test datastore. |
76 | */ | 76 | */ |
77 | public function tearDown() | 77 | protected function tearDown(): void |
78 | { | 78 | { |
79 | @unlink(self::$testDatastore); | 79 | @unlink(self::$testDatastore); |
80 | } | 80 | } |
diff --git a/tests/api/controllers/links/PostLinkTest.php b/tests/api/controllers/links/PostLinkTest.php index 4e791a04..b1c9008b 100644 --- a/tests/api/controllers/links/PostLinkTest.php +++ b/tests/api/controllers/links/PostLinkTest.php | |||
@@ -70,7 +70,7 @@ class PostLinkTest extends TestCase | |||
70 | /** | 70 | /** |
71 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 71 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
72 | */ | 72 | */ |
73 | public function setUp() | 73 | protected function setUp(): void |
74 | { | 74 | { |
75 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 75 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
76 | $this->conf->set('resource.datastore', self::$testDatastore); | 76 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -107,7 +107,7 @@ class PostLinkTest extends TestCase | |||
107 | /** | 107 | /** |
108 | * After every test, remove the test datastore. | 108 | * After every test, remove the test datastore. |
109 | */ | 109 | */ |
110 | public function tearDown() | 110 | protected function tearDown(): void |
111 | { | 111 | { |
112 | @unlink(self::$testDatastore); | 112 | @unlink(self::$testDatastore); |
113 | @unlink(self::$testHistory); | 113 | @unlink(self::$testHistory); |
diff --git a/tests/api/controllers/links/PutLinkTest.php b/tests/api/controllers/links/PutLinkTest.php index 302cac0f..f582a2b5 100644 --- a/tests/api/controllers/links/PutLinkTest.php +++ b/tests/api/controllers/links/PutLinkTest.php | |||
@@ -62,7 +62,7 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase | |||
62 | /** | 62 | /** |
63 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 63 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
64 | */ | 64 | */ |
65 | public function setUp() | 65 | protected function setUp(): void |
66 | { | 66 | { |
67 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 67 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
68 | $this->conf->set('resource.datastore', self::$testDatastore); | 68 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -91,7 +91,7 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase | |||
91 | /** | 91 | /** |
92 | * After every test, remove the test datastore. | 92 | * After every test, remove the test datastore. |
93 | */ | 93 | */ |
94 | public function tearDown() | 94 | protected function tearDown(): void |
95 | { | 95 | { |
96 | @unlink(self::$testDatastore); | 96 | @unlink(self::$testDatastore); |
97 | @unlink(self::$testHistory); | 97 | @unlink(self::$testHistory); |
diff --git a/tests/api/controllers/tags/DeleteTagTest.php b/tests/api/controllers/tags/DeleteTagTest.php index c6748872..b0980572 100644 --- a/tests/api/controllers/tags/DeleteTagTest.php +++ b/tests/api/controllers/tags/DeleteTagTest.php | |||
@@ -57,7 +57,7 @@ class DeleteTagTest extends \PHPUnit\Framework\TestCase | |||
57 | /** | 57 | /** |
58 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. | 58 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. |
59 | */ | 59 | */ |
60 | public function setUp() | 60 | protected function setUp(): void |
61 | { | 61 | { |
62 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 62 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
63 | $this->conf->set('resource.datastore', self::$testDatastore); | 63 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -79,7 +79,7 @@ class DeleteTagTest extends \PHPUnit\Framework\TestCase | |||
79 | /** | 79 | /** |
80 | * After each test, remove the test datastore. | 80 | * After each test, remove the test datastore. |
81 | */ | 81 | */ |
82 | public function tearDown() | 82 | protected function tearDown(): void |
83 | { | 83 | { |
84 | @unlink(self::$testDatastore); | 84 | @unlink(self::$testDatastore); |
85 | @unlink(self::$testHistory); | 85 | @unlink(self::$testHistory); |
diff --git a/tests/api/controllers/tags/GetTagNameTest.php b/tests/api/controllers/tags/GetTagNameTest.php index b9a81f9b..f8ee10d9 100644 --- a/tests/api/controllers/tags/GetTagNameTest.php +++ b/tests/api/controllers/tags/GetTagNameTest.php | |||
@@ -53,7 +53,7 @@ class GetTagNameTest extends \PHPUnit\Framework\TestCase | |||
53 | /** | 53 | /** |
54 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. | 54 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. |
55 | */ | 55 | */ |
56 | public function setUp() | 56 | protected function setUp(): void |
57 | { | 57 | { |
58 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 58 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
59 | $this->conf->set('resource.datastore', self::$testDatastore); | 59 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -72,7 +72,7 @@ class GetTagNameTest extends \PHPUnit\Framework\TestCase | |||
72 | /** | 72 | /** |
73 | * After each test, remove the test datastore. | 73 | * After each test, remove the test datastore. |
74 | */ | 74 | */ |
75 | public function tearDown() | 75 | protected function tearDown(): void |
76 | { | 76 | { |
77 | @unlink(self::$testDatastore); | 77 | @unlink(self::$testDatastore); |
78 | } | 78 | } |
diff --git a/tests/api/controllers/tags/GetTagsTest.php b/tests/api/controllers/tags/GetTagsTest.php index 53a3326d..ab666f20 100644 --- a/tests/api/controllers/tags/GetTagsTest.php +++ b/tests/api/controllers/tags/GetTagsTest.php | |||
@@ -57,7 +57,7 @@ class GetTagsTest extends \PHPUnit\Framework\TestCase | |||
57 | /** | 57 | /** |
58 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 58 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
59 | */ | 59 | */ |
60 | public function setUp() | 60 | protected function setUp(): void |
61 | { | 61 | { |
62 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 62 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
63 | $this->conf->set('resource.datastore', self::$testDatastore); | 63 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -78,7 +78,7 @@ class GetTagsTest extends \PHPUnit\Framework\TestCase | |||
78 | /** | 78 | /** |
79 | * After every test, remove the test datastore. | 79 | * After every test, remove the test datastore. |
80 | */ | 80 | */ |
81 | public function tearDown() | 81 | protected function tearDown(): void |
82 | { | 82 | { |
83 | @unlink(self::$testDatastore); | 83 | @unlink(self::$testDatastore); |
84 | } | 84 | } |
diff --git a/tests/api/controllers/tags/PutTagTest.php b/tests/api/controllers/tags/PutTagTest.php index 2a3cc15a..e0bc8663 100644 --- a/tests/api/controllers/tags/PutTagTest.php +++ b/tests/api/controllers/tags/PutTagTest.php | |||
@@ -62,7 +62,7 @@ class PutTagTest extends \PHPUnit\Framework\TestCase | |||
62 | /** | 62 | /** |
63 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. | 63 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
64 | */ | 64 | */ |
65 | public function setUp() | 65 | protected function setUp(): void |
66 | { | 66 | { |
67 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 67 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
68 | $this->conf->set('resource.datastore', self::$testDatastore); | 68 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -84,7 +84,7 @@ class PutTagTest extends \PHPUnit\Framework\TestCase | |||
84 | /** | 84 | /** |
85 | * After every test, remove the test datastore. | 85 | * After every test, remove the test datastore. |
86 | */ | 86 | */ |
87 | public function tearDown() | 87 | protected function tearDown(): void |
88 | { | 88 | { |
89 | @unlink(self::$testDatastore); | 89 | @unlink(self::$testDatastore); |
90 | @unlink(self::$testHistory); | 90 | @unlink(self::$testHistory); |
diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php index a4ec1013..aed4dc76 100644 --- a/tests/bookmark/BookmarkFileServiceTest.php +++ b/tests/bookmark/BookmarkFileServiceTest.php | |||
@@ -66,7 +66,7 @@ class BookmarkFileServiceTest extends TestCase | |||
66 | * | 66 | * |
67 | * Resets test data for each test | 67 | * Resets test data for each test |
68 | */ | 68 | */ |
69 | protected function setUp() | 69 | protected function setUp(): void |
70 | { | 70 | { |
71 | if (file_exists(self::$testDatastore)) { | 71 | if (file_exists(self::$testDatastore)) { |
72 | unlink(self::$testDatastore); | 72 | unlink(self::$testDatastore); |
diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php index 33160eb0..f1612e9b 100644 --- a/tests/config/ConfigJsonTest.php +++ b/tests/config/ConfigJsonTest.php | |||
@@ -11,7 +11,7 @@ class ConfigJsonTest extends \PHPUnit\Framework\TestCase | |||
11 | */ | 11 | */ |
12 | protected $configIO; | 12 | protected $configIO; |
13 | 13 | ||
14 | public function setUp() | 14 | protected function setUp(): void |
15 | { | 15 | { |
16 | $this->configIO = new ConfigJson(); | 16 | $this->configIO = new ConfigJson(); |
17 | } | 17 | } |
diff --git a/tests/config/ConfigManagerTest.php b/tests/config/ConfigManagerTest.php index 33830bc9..69456bce 100644 --- a/tests/config/ConfigManagerTest.php +++ b/tests/config/ConfigManagerTest.php | |||
@@ -14,7 +14,7 @@ class ConfigManagerTest extends \PHPUnit\Framework\TestCase | |||
14 | */ | 14 | */ |
15 | protected $conf; | 15 | protected $conf; |
16 | 16 | ||
17 | public function setUp() | 17 | protected function setUp(): void |
18 | { | 18 | { |
19 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 19 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
20 | } | 20 | } |
diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php index fb91b51b..a9aa80f5 100644 --- a/tests/config/ConfigPhpTest.php +++ b/tests/config/ConfigPhpTest.php | |||
@@ -15,7 +15,7 @@ class ConfigPhpTest extends \PHPUnit\Framework\TestCase | |||
15 | */ | 15 | */ |
16 | protected $configIO; | 16 | protected $configIO; |
17 | 17 | ||
18 | public function setUp() | 18 | protected function setUp(): void |
19 | { | 19 | { |
20 | $this->configIO = new ConfigPhp(); | 20 | $this->configIO = new ConfigPhp(); |
21 | } | 21 | } |
diff --git a/tests/feed/CachedPageTest.php b/tests/feed/CachedPageTest.php index 2e716432..25d640d3 100644 --- a/tests/feed/CachedPageTest.php +++ b/tests/feed/CachedPageTest.php | |||
@@ -17,7 +17,7 @@ class CachedPageTest extends \PHPUnit\Framework\TestCase | |||
17 | /** | 17 | /** |
18 | * Create the cache directory if needed | 18 | * Create the cache directory if needed |
19 | */ | 19 | */ |
20 | public static function setUpBeforeClass() | 20 | public static function setUpBeforeClass(): void |
21 | { | 21 | { |
22 | if (!is_dir(self::$testCacheDir)) { | 22 | if (!is_dir(self::$testCacheDir)) { |
23 | mkdir(self::$testCacheDir); | 23 | mkdir(self::$testCacheDir); |
@@ -28,7 +28,7 @@ class CachedPageTest extends \PHPUnit\Framework\TestCase | |||
28 | /** | 28 | /** |
29 | * Reset the page cache | 29 | * Reset the page cache |
30 | */ | 30 | */ |
31 | public function setUp() | 31 | protected function setUp(): void |
32 | { | 32 | { |
33 | if (file_exists(self::$filename)) { | 33 | if (file_exists(self::$filename)) { |
34 | unlink(self::$filename); | 34 | unlink(self::$filename); |
diff --git a/tests/formatter/BookmarkDefaultFormatterTest.php b/tests/formatter/BookmarkDefaultFormatterTest.php index cf48b00b..9ea86c14 100644 --- a/tests/formatter/BookmarkDefaultFormatterTest.php +++ b/tests/formatter/BookmarkDefaultFormatterTest.php | |||
@@ -25,7 +25,7 @@ class BookmarkDefaultFormatterTest extends TestCase | |||
25 | /** | 25 | /** |
26 | * Initialize formatter instance. | 26 | * Initialize formatter instance. |
27 | */ | 27 | */ |
28 | public function setUp() | 28 | protected function setUp(): void |
29 | { | 29 | { |
30 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); | 30 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); |
31 | $this->conf = new ConfigManager(self::$testConf); | 31 | $this->conf = new ConfigManager(self::$testConf); |
diff --git a/tests/formatter/BookmarkMarkdownFormatterTest.php b/tests/formatter/BookmarkMarkdownFormatterTest.php index 3e72d1ee..a7729416 100644 --- a/tests/formatter/BookmarkMarkdownFormatterTest.php +++ b/tests/formatter/BookmarkMarkdownFormatterTest.php | |||
@@ -25,7 +25,7 @@ class BookmarkMarkdownFormatterTest extends TestCase | |||
25 | /** | 25 | /** |
26 | * Initialize formatter instance. | 26 | * Initialize formatter instance. |
27 | */ | 27 | */ |
28 | public function setUp() | 28 | protected function setUp(): void |
29 | { | 29 | { |
30 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); | 30 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); |
31 | $this->conf = new ConfigManager(self::$testConf); | 31 | $this->conf = new ConfigManager(self::$testConf); |
diff --git a/tests/formatter/BookmarkRawFormatterTest.php b/tests/formatter/BookmarkRawFormatterTest.php index 4491b035..76cf1172 100644 --- a/tests/formatter/BookmarkRawFormatterTest.php +++ b/tests/formatter/BookmarkRawFormatterTest.php | |||
@@ -25,7 +25,7 @@ class BookmarkRawFormatterTest extends TestCase | |||
25 | /** | 25 | /** |
26 | * Initialize formatter instance. | 26 | * Initialize formatter instance. |
27 | */ | 27 | */ |
28 | public function setUp() | 28 | protected function setUp(): void |
29 | { | 29 | { |
30 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); | 30 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); |
31 | $this->conf = new ConfigManager(self::$testConf); | 31 | $this->conf = new ConfigManager(self::$testConf); |
diff --git a/tests/formatter/FormatterFactoryTest.php b/tests/formatter/FormatterFactoryTest.php index 5adf3ffd..6aab6a61 100644 --- a/tests/formatter/FormatterFactoryTest.php +++ b/tests/formatter/FormatterFactoryTest.php | |||
@@ -24,7 +24,7 @@ class FormatterFactoryTest extends TestCase | |||
24 | /** | 24 | /** |
25 | * Initialize FormatterFactory instance | 25 | * Initialize FormatterFactory instance |
26 | */ | 26 | */ |
27 | public function setUp() | 27 | protected function setUp(): void |
28 | { | 28 | { |
29 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); | 29 | copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); |
30 | $this->conf = new ConfigManager(self::$testConf); | 30 | $this->conf = new ConfigManager(self::$testConf); |
diff --git a/tests/languages/fr/LanguagesFrTest.php b/tests/languages/fr/LanguagesFrTest.php index b8b7ca3a..e412b5bc 100644 --- a/tests/languages/fr/LanguagesFrTest.php +++ b/tests/languages/fr/LanguagesFrTest.php | |||
@@ -27,7 +27,7 @@ class LanguagesFrTest extends \PHPUnit\Framework\TestCase | |||
27 | /** | 27 | /** |
28 | * Init: force French | 28 | * Init: force French |
29 | */ | 29 | */ |
30 | public function setUp() | 30 | protected function setUp(): void |
31 | { | 31 | { |
32 | $this->conf = new ConfigManager(self::$configFile); | 32 | $this->conf = new ConfigManager(self::$configFile); |
33 | $this->conf->set('translation.language', 'fr'); | 33 | $this->conf->set('translation.language', 'fr'); |
@@ -36,7 +36,7 @@ class LanguagesFrTest extends \PHPUnit\Framework\TestCase | |||
36 | /** | 36 | /** |
37 | * Reset the locale since gettext seems to mess with it, making it too long | 37 | * Reset the locale since gettext seems to mess with it, making it too long |
38 | */ | 38 | */ |
39 | public static function tearDownAfterClass() | 39 | public static function tearDownAfterClass(): void |
40 | { | 40 | { |
41 | if (! empty(getenv('UT_LOCALE'))) { | 41 | if (! empty(getenv('UT_LOCALE'))) { |
42 | setlocale(LC_ALL, getenv('UT_LOCALE')); | 42 | setlocale(LC_ALL, getenv('UT_LOCALE')); |
diff --git a/tests/legacy/LegacyLinkDBTest.php b/tests/legacy/LegacyLinkDBTest.php index 0884ad03..92cf607c 100644 --- a/tests/legacy/LegacyLinkDBTest.php +++ b/tests/legacy/LegacyLinkDBTest.php | |||
@@ -52,7 +52,7 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase | |||
52 | * | 52 | * |
53 | * Resets test data for each test | 53 | * Resets test data for each test |
54 | */ | 54 | */ |
55 | protected function setUp() | 55 | protected function setUp(): void |
56 | { | 56 | { |
57 | if (file_exists(self::$testDatastore)) { | 57 | if (file_exists(self::$testDatastore)) { |
58 | unlink(self::$testDatastore); | 58 | unlink(self::$testDatastore); |
diff --git a/tests/legacy/LegacyLinkFilterTest.php b/tests/legacy/LegacyLinkFilterTest.php index ba9ec529..8223cc15 100644 --- a/tests/legacy/LegacyLinkFilterTest.php +++ b/tests/legacy/LegacyLinkFilterTest.php | |||
@@ -34,7 +34,7 @@ class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase | |||
34 | /** | 34 | /** |
35 | * Instantiate linkFilter with ReferenceLinkDB data. | 35 | * Instantiate linkFilter with ReferenceLinkDB data. |
36 | */ | 36 | */ |
37 | public static function setUpBeforeClass() | 37 | public static function setUpBeforeClass(): void |
38 | { | 38 | { |
39 | self::$refDB = new ReferenceLinkDB(true); | 39 | self::$refDB = new ReferenceLinkDB(true); |
40 | self::$refDB->write(self::$testDatastore); | 40 | self::$refDB->write(self::$testDatastore); |
diff --git a/tests/legacy/LegacyUpdaterTest.php b/tests/legacy/LegacyUpdaterTest.php index 7c429811..9b693dcb 100644 --- a/tests/legacy/LegacyUpdaterTest.php +++ b/tests/legacy/LegacyUpdaterTest.php | |||
@@ -40,7 +40,7 @@ class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase | |||
40 | /** | 40 | /** |
41 | * Executed before each test. | 41 | * Executed before each test. |
42 | */ | 42 | */ |
43 | public function setUp() | 43 | protected function setUp(): void |
44 | { | 44 | { |
45 | copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php'); | 45 | copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php'); |
46 | $this->conf = new ConfigManager(self::$configFile); | 46 | $this->conf = new ConfigManager(self::$configFile); |
@@ -754,7 +754,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; | |||
754 | if (isset($_SESSION['warnings'])) { | 754 | if (isset($_SESSION['warnings'])) { |
755 | unset($_SESSION['warnings']); | 755 | unset($_SESSION['warnings']); |
756 | } | 756 | } |
757 | 757 | ||
758 | $updater = new LegacyUpdater([], [], $this->conf, true, $_SESSION); | 758 | $updater = new LegacyUpdater([], [], $this->conf, true, $_SESSION); |
759 | $this->assertTrue($updater->updateMethodWebThumbnailer()); | 759 | $this->assertTrue($updater->updateMethodWebThumbnailer()); |
760 | $this->assertFalse($this->conf->exists('thumbnail')); | 760 | $this->assertFalse($this->conf->exists('thumbnail')); |
diff --git a/tests/netscape/BookmarkExportTest.php b/tests/netscape/BookmarkExportTest.php index 509da51d..13b85f3d 100644 --- a/tests/netscape/BookmarkExportTest.php +++ b/tests/netscape/BookmarkExportTest.php | |||
@@ -54,7 +54,7 @@ class BookmarkExportTest extends TestCase | |||
54 | /** | 54 | /** |
55 | * Instantiate reference data | 55 | * Instantiate reference data |
56 | */ | 56 | */ |
57 | public static function setUpBeforeClass() | 57 | public static function setUpBeforeClass(): void |
58 | { | 58 | { |
59 | static::$conf = new ConfigManager('tests/utils/config/configJson'); | 59 | static::$conf = new ConfigManager('tests/utils/config/configJson'); |
60 | static::$conf->set('resource.datastore', static::$testDatastore); | 60 | static::$conf->set('resource.datastore', static::$testDatastore); |
diff --git a/tests/netscape/BookmarkImportTest.php b/tests/netscape/BookmarkImportTest.php index f678e26b..89ae4aa7 100644 --- a/tests/netscape/BookmarkImportTest.php +++ b/tests/netscape/BookmarkImportTest.php | |||
@@ -75,7 +75,7 @@ class BookmarkImportTest extends TestCase | |||
75 | */ | 75 | */ |
76 | protected static $defaultTimeZone; | 76 | protected static $defaultTimeZone; |
77 | 77 | ||
78 | public static function setUpBeforeClass() | 78 | public static function setUpBeforeClass(): void |
79 | { | 79 | { |
80 | self::$defaultTimeZone = date_default_timezone_get(); | 80 | self::$defaultTimeZone = date_default_timezone_get(); |
81 | // Timezone without DST for test consistency | 81 | // Timezone without DST for test consistency |
@@ -85,7 +85,7 @@ class BookmarkImportTest extends TestCase | |||
85 | /** | 85 | /** |
86 | * Resets test data before each test | 86 | * Resets test data before each test |
87 | */ | 87 | */ |
88 | protected function setUp() | 88 | protected function setUp(): void |
89 | { | 89 | { |
90 | if (file_exists(self::$testDatastore)) { | 90 | if (file_exists(self::$testDatastore)) { |
91 | unlink(self::$testDatastore); | 91 | unlink(self::$testDatastore); |
@@ -104,12 +104,12 @@ class BookmarkImportTest extends TestCase | |||
104 | /** | 104 | /** |
105 | * Delete history file. | 105 | * Delete history file. |
106 | */ | 106 | */ |
107 | public function tearDown() | 107 | protected function tearDown(): void |
108 | { | 108 | { |
109 | @unlink(self::$historyFilePath); | 109 | @unlink(self::$historyFilePath); |
110 | } | 110 | } |
111 | 111 | ||
112 | public static function tearDownAfterClass() | 112 | public static function tearDownAfterClass(): void |
113 | { | 113 | { |
114 | date_default_timezone_set(self::$defaultTimeZone); | 114 | date_default_timezone_set(self::$defaultTimeZone); |
115 | } | 115 | } |
diff --git a/tests/plugins/PluginAddlinkTest.php b/tests/plugins/PluginAddlinkTest.php index aa5c6988..1f60d289 100644 --- a/tests/plugins/PluginAddlinkTest.php +++ b/tests/plugins/PluginAddlinkTest.php | |||
@@ -14,7 +14,7 @@ class PluginAddlinkTest extends \PHPUnit\Framework\TestCase | |||
14 | /** | 14 | /** |
15 | * Reset plugin path. | 15 | * Reset plugin path. |
16 | */ | 16 | */ |
17 | public function setUp() | 17 | protected function setUp(): void |
18 | { | 18 | { |
19 | PluginManager::$PLUGINS_PATH = 'plugins'; | 19 | PluginManager::$PLUGINS_PATH = 'plugins'; |
20 | } | 20 | } |
diff --git a/tests/plugins/PluginDefaultColorsTest.php b/tests/plugins/PluginDefaultColorsTest.php index 9835dfa3..240bb4b2 100644 --- a/tests/plugins/PluginDefaultColorsTest.php +++ b/tests/plugins/PluginDefaultColorsTest.php | |||
@@ -19,7 +19,7 @@ class PluginDefaultColorsTest extends TestCase | |||
19 | /** | 19 | /** |
20 | * Reset plugin path | 20 | * Reset plugin path |
21 | */ | 21 | */ |
22 | public function setUp() | 22 | protected function setUp(): void |
23 | { | 23 | { |
24 | PluginManager::$PLUGINS_PATH = 'sandbox'; | 24 | PluginManager::$PLUGINS_PATH = 'sandbox'; |
25 | mkdir(PluginManager::$PLUGINS_PATH . '/default_colors/'); | 25 | mkdir(PluginManager::$PLUGINS_PATH . '/default_colors/'); |
@@ -32,7 +32,7 @@ class PluginDefaultColorsTest extends TestCase | |||
32 | /** | 32 | /** |
33 | * Remove sandbox files and folder | 33 | * Remove sandbox files and folder |
34 | */ | 34 | */ |
35 | public function tearDown() | 35 | protected function tearDown(): void |
36 | { | 36 | { |
37 | if (file_exists('sandbox/default_colors/default_colors.css.template')) { | 37 | if (file_exists('sandbox/default_colors/default_colors.css.template')) { |
38 | unlink('sandbox/default_colors/default_colors.css.template'); | 38 | unlink('sandbox/default_colors/default_colors.css.template'); |
diff --git a/tests/plugins/PluginPlayvideosTest.php b/tests/plugins/PluginPlayvideosTest.php index b7b6ce53..de1a1aec 100644 --- a/tests/plugins/PluginPlayvideosTest.php +++ b/tests/plugins/PluginPlayvideosTest.php | |||
@@ -19,7 +19,7 @@ class PluginPlayvideosTest extends \PHPUnit\Framework\TestCase | |||
19 | /** | 19 | /** |
20 | * Reset plugin path | 20 | * Reset plugin path |
21 | */ | 21 | */ |
22 | public function setUp() | 22 | protected function setUp(): void |
23 | { | 23 | { |
24 | PluginManager::$PLUGINS_PATH = 'plugins'; | 24 | PluginManager::$PLUGINS_PATH = 'plugins'; |
25 | } | 25 | } |
diff --git a/tests/plugins/PluginPubsubhubbubTest.php b/tests/plugins/PluginPubsubhubbubTest.php index e66f484e..d30c3703 100644 --- a/tests/plugins/PluginPubsubhubbubTest.php +++ b/tests/plugins/PluginPubsubhubbubTest.php | |||
@@ -21,7 +21,7 @@ class PluginPubsubhubbubTest extends \PHPUnit\Framework\TestCase | |||
21 | /** | 21 | /** |
22 | * Reset plugin path | 22 | * Reset plugin path |
23 | */ | 23 | */ |
24 | public function setUp() | 24 | protected function setUp(): void |
25 | { | 25 | { |
26 | PluginManager::$PLUGINS_PATH = 'plugins'; | 26 | PluginManager::$PLUGINS_PATH = 'plugins'; |
27 | } | 27 | } |
diff --git a/tests/plugins/PluginQrcodeTest.php b/tests/plugins/PluginQrcodeTest.php index c9f8c733..bc6be0eb 100644 --- a/tests/plugins/PluginQrcodeTest.php +++ b/tests/plugins/PluginQrcodeTest.php | |||
@@ -19,7 +19,7 @@ class PluginQrcodeTest extends \PHPUnit\Framework\TestCase | |||
19 | /** | 19 | /** |
20 | * Reset plugin path | 20 | * Reset plugin path |
21 | */ | 21 | */ |
22 | public function setUp() | 22 | protected function setUp(): void |
23 | { | 23 | { |
24 | PluginManager::$PLUGINS_PATH = 'plugins'; | 24 | PluginManager::$PLUGINS_PATH = 'plugins'; |
25 | } | 25 | } |
diff --git a/tests/plugins/PluginWallabagTest.php b/tests/plugins/PluginWallabagTest.php index 79751921..372929ea 100644 --- a/tests/plugins/PluginWallabagTest.php +++ b/tests/plugins/PluginWallabagTest.php | |||
@@ -15,7 +15,7 @@ class PluginWallabagTest extends \PHPUnit\Framework\TestCase | |||
15 | /** | 15 | /** |
16 | * Reset plugin path | 16 | * Reset plugin path |
17 | */ | 17 | */ |
18 | public function setUp() | 18 | protected function setUp(): void |
19 | { | 19 | { |
20 | PluginManager::$PLUGINS_PATH = 'plugins'; | 20 | PluginManager::$PLUGINS_PATH = 'plugins'; |
21 | } | 21 | } |
diff --git a/tests/plugins/WallabagInstanceTest.php b/tests/plugins/WallabagInstanceTest.php index a3cd9076..4cb0d4cc 100644 --- a/tests/plugins/WallabagInstanceTest.php +++ b/tests/plugins/WallabagInstanceTest.php | |||
@@ -14,7 +14,7 @@ class WallabagInstanceTest extends \PHPUnit\Framework\TestCase | |||
14 | /** | 14 | /** |
15 | * Reset plugin path | 15 | * Reset plugin path |
16 | */ | 16 | */ |
17 | public function setUp() | 17 | protected function setUp(): void |
18 | { | 18 | { |
19 | $this->instance = 'http://some.url'; | 19 | $this->instance = 'http://some.url'; |
20 | } | 20 | } |
diff --git a/tests/render/PageCacheManagerTest.php b/tests/render/PageCacheManagerTest.php index c258f45f..4aa7e179 100644 --- a/tests/render/PageCacheManagerTest.php +++ b/tests/render/PageCacheManagerTest.php | |||
@@ -29,7 +29,7 @@ class PageCacheManagerTest extends TestCase | |||
29 | /** | 29 | /** |
30 | * Populate the cache with dummy files | 30 | * Populate the cache with dummy files |
31 | */ | 31 | */ |
32 | public function setUp() | 32 | protected function setUp(): void |
33 | { | 33 | { |
34 | $this->cacheManager = new PageCacheManager(static::$testCacheDir, true); | 34 | $this->cacheManager = new PageCacheManager(static::$testCacheDir, true); |
35 | 35 | ||
@@ -48,7 +48,7 @@ class PageCacheManagerTest extends TestCase | |||
48 | /** | 48 | /** |
49 | * Remove dummycache folder after each tests. | 49 | * Remove dummycache folder after each tests. |
50 | */ | 50 | */ |
51 | public function tearDown() | 51 | protected function tearDown(): void |
52 | { | 52 | { |
53 | array_map('unlink', glob(self::$testCacheDir . '/*')); | 53 | array_map('unlink', glob(self::$testCacheDir . '/*')); |
54 | rmdir(self::$testCacheDir); | 54 | rmdir(self::$testCacheDir); |
diff --git a/tests/security/BanManagerTest.php b/tests/security/BanManagerTest.php index bba7c8ad..2fef82f5 100644 --- a/tests/security/BanManagerTest.php +++ b/tests/security/BanManagerTest.php | |||
@@ -32,7 +32,7 @@ class BanManagerTest extends TestCase | |||
32 | /** | 32 | /** |
33 | * Prepare or reset test resources | 33 | * Prepare or reset test resources |
34 | */ | 34 | */ |
35 | public function setUp() | 35 | protected function setUp(): void |
36 | { | 36 | { |
37 | if (file_exists($this->banFile)) { | 37 | if (file_exists($this->banFile)) { |
38 | unlink($this->banFile); | 38 | unlink($this->banFile); |
diff --git a/tests/security/LoginManagerTest.php b/tests/security/LoginManagerTest.php index f242be09..cc9aa647 100644 --- a/tests/security/LoginManagerTest.php +++ b/tests/security/LoginManagerTest.php | |||
@@ -63,7 +63,7 @@ class LoginManagerTest extends TestCase | |||
63 | /** | 63 | /** |
64 | * Prepare or reset test resources | 64 | * Prepare or reset test resources |
65 | */ | 65 | */ |
66 | public function setUp() | 66 | protected function setUp(): void |
67 | { | 67 | { |
68 | if (file_exists($this->banFile)) { | 68 | if (file_exists($this->banFile)) { |
69 | unlink($this->banFile); | 69 | unlink($this->banFile); |
diff --git a/tests/security/SessionManagerTest.php b/tests/security/SessionManagerTest.php index 11a59f9c..27e3b1a9 100644 --- a/tests/security/SessionManagerTest.php +++ b/tests/security/SessionManagerTest.php | |||
@@ -24,7 +24,7 @@ class SessionManagerTest extends TestCase | |||
24 | /** | 24 | /** |
25 | * Assign reference data | 25 | * Assign reference data |
26 | */ | 26 | */ |
27 | public static function setUpBeforeClass() | 27 | public static function setUpBeforeClass(): void |
28 | { | 28 | { |
29 | self::$sidHashes = \ReferenceSessionIdHashes::getHashes(); | 29 | self::$sidHashes = \ReferenceSessionIdHashes::getHashes(); |
30 | } | 30 | } |
@@ -32,7 +32,7 @@ class SessionManagerTest extends TestCase | |||
32 | /** | 32 | /** |
33 | * Initialize or reset test resources | 33 | * Initialize or reset test resources |
34 | */ | 34 | */ |
35 | public function setUp() | 35 | protected function setUp(): void |
36 | { | 36 | { |
37 | $this->conf = new \FakeConfigManager([ | 37 | $this->conf = new \FakeConfigManager([ |
38 | 'credentials.login' => 'johndoe', | 38 | 'credentials.login' => 'johndoe', |
diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php index a7dd70bf..277f2fb0 100644 --- a/tests/updater/UpdaterTest.php +++ b/tests/updater/UpdaterTest.php | |||
@@ -42,7 +42,7 @@ class UpdaterTest extends TestCase | |||
42 | /** | 42 | /** |
43 | * Executed before each test. | 43 | * Executed before each test. |
44 | */ | 44 | */ |
45 | public function setUp() | 45 | protected function setUp(): void |
46 | { | 46 | { |
47 | $this->refDB = new \ReferenceLinkDB(); | 47 | $this->refDB = new \ReferenceLinkDB(); |
48 | $this->refDB->write(self::$testDatastore); | 48 | $this->refDB->write(self::$testDatastore); |