]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Comply with PHPUnit V8: setup/teardown functions must return void
authorArthurHoaro <arthur@hoa.ro>
Sat, 26 Sep 2020 13:08:39 +0000 (15:08 +0200)
committerArthurHoaro <arthur@hoa.ro>
Sat, 26 Sep 2020 13:08:39 +0000 (15:08 +0200)
47 files changed:
tests/ApplicationUtilsTest.php
tests/FileUtilsTest.php
tests/HistoryTest.php
tests/LanguagesTest.php
tests/ThumbnailerTest.php
tests/TimeZoneTest.php
tests/UtilsTest.php
tests/api/ApiMiddlewareTest.php
tests/api/ApiUtilsTest.php
tests/api/controllers/history/HistoryTest.php
tests/api/controllers/info/InfoTest.php
tests/api/controllers/links/DeleteLinkTest.php
tests/api/controllers/links/GetLinkIdTest.php
tests/api/controllers/links/GetLinksTest.php
tests/api/controllers/links/PostLinkTest.php
tests/api/controllers/links/PutLinkTest.php
tests/api/controllers/tags/DeleteTagTest.php
tests/api/controllers/tags/GetTagNameTest.php
tests/api/controllers/tags/GetTagsTest.php
tests/api/controllers/tags/PutTagTest.php
tests/bookmark/BookmarkFileServiceTest.php
tests/config/ConfigJsonTest.php
tests/config/ConfigManagerTest.php
tests/config/ConfigPhpTest.php
tests/feed/CachedPageTest.php
tests/formatter/BookmarkDefaultFormatterTest.php
tests/formatter/BookmarkMarkdownFormatterTest.php
tests/formatter/BookmarkRawFormatterTest.php
tests/formatter/FormatterFactoryTest.php
tests/languages/fr/LanguagesFrTest.php
tests/legacy/LegacyLinkDBTest.php
tests/legacy/LegacyLinkFilterTest.php
tests/legacy/LegacyUpdaterTest.php
tests/netscape/BookmarkExportTest.php
tests/netscape/BookmarkImportTest.php
tests/plugins/PluginAddlinkTest.php
tests/plugins/PluginDefaultColorsTest.php
tests/plugins/PluginPlayvideosTest.php
tests/plugins/PluginPubsubhubbubTest.php
tests/plugins/PluginQrcodeTest.php
tests/plugins/PluginWallabagTest.php
tests/plugins/WallabagInstanceTest.php
tests/render/PageCacheManagerTest.php
tests/security/BanManagerTest.php
tests/security/LoginManagerTest.php
tests/security/SessionManagerTest.php
tests/updater/UpdaterTest.php

index 15388970a0b0680e4a2e0ecb7fbf5d7d6bb2d90d..5735919608199f16d5293c6876f2cf252791926d 100644 (file)
@@ -17,7 +17,7 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset test data for each test
      */
-    public function setUp()
+    protected function setUp(): void
     {
         FakeApplicationUtils::$VERSION_CODE = '';
         if (file_exists(self::$testUpdateFile)) {
@@ -28,7 +28,7 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
     /**
      * Remove test version file if it exists
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         if (is_file('sandbox/version.php')) {
             unlink('sandbox/version.php');
index 57719175542c3562af141c0658a9b28e1ba96dcb..eb9cb89aacda6e530b10e4afc34e01410f47035c 100644 (file)
@@ -19,7 +19,7 @@ class FileUtilsTest extends \PHPUnit\Framework\TestCase
     /**
      * Delete test file after every test.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$file);
     }
index 7189c3a99fb171dd436834252b7243eaa59a3d23..e9e61032efb71ef23a6af3cf79e37544f3ed445c 100644 (file)
@@ -16,7 +16,7 @@ class HistoryTest extends \PHPUnit\Framework\TestCase
     /**
      * Delete history file.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         if (file_exists(self::$historyFilePath)) {
             unlink(self::$historyFilePath);
index de83f2913707aef08f52ff08474186e38210c9a8..914179c805405282ef878b999a05c9993ab5746c 100644 (file)
@@ -22,7 +22,7 @@ class LanguagesTest extends \PHPUnit\Framework\TestCase
     /**
      *
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager(self::$configFile);
     }
index c01849f7f089e45e1ca17af6dcb0ee0a3c2e5daf..5b6d6a4d9a96c104264a92dd3398669170d4be1e 100644 (file)
@@ -30,7 +30,7 @@ class ThumbnailerTest extends TestCase
      */
     protected $conf;
 
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('thumbnails.mode', Thumbnailer::MODE_ALL);
@@ -43,7 +43,7 @@ class ThumbnailerTest extends TestCase
         WTConfigManager::addFile('tests/utils/config/wt.json');
     }
 
-    public function tearDown()
+    protected function tearDown(): void
     {
         $this->rrmdirContent('sandbox/');
     }
index 02bf060f34a0a7a1be177b2ab96d10316c73b869..d3d9aeebbaf9ec07e0c7e0d4475244642b981d47 100644 (file)
@@ -15,7 +15,7 @@ class TimeZoneTest extends PHPUnit\Framework\TestCase
      */
     protected $installedTimezones;
 
-    public function setUp()
+    protected function setUp(): void
     {
         $this->installedTimezones = [
             'Antarctica/Syowa',
index 26d2a6b823170d913be90f3372f220863d8827ca..93b77539cb33fb8c16e069415f5e81a3a4f7554c 100644 (file)
@@ -26,7 +26,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     /**
      * Assign reference data
      */
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$defaultTimeZone = date_default_timezone_get();
         // Timezone without DST for test consistency
@@ -36,7 +36,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     /**
      * Reset the timezone
      */
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         date_default_timezone_set(self::$defaultTimeZone);
     }
@@ -44,7 +44,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase
     /**
      * Resets test data before each test
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         if (file_exists(self::$testLogFile)) {
             unlink(self::$testLogFile);
index df2fb33a7183e306b7bc53344633d93f15003f5b..b157e4a77ae5202b3a9e06be2cb7cd7a17904506 100644 (file)
@@ -43,7 +43,7 @@ class ApiMiddlewareTest extends \PHPUnit\Framework\TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('api.secret', 'NapoleonWasALizard');
@@ -61,7 +61,7 @@ class ApiMiddlewareTest extends \PHPUnit\Framework\TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
     }
index 7efec9bb98f6aa74bea0b2d572e7142bb94ad7a9..e8075a5d3ada2ce4a74ba3a3ce597b4aa025deca 100644 (file)
@@ -13,7 +13,7 @@ class ApiUtilsTest extends \PHPUnit\Framework\TestCase
     /**
      * Force the timezone for ISO datetimes.
      */
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         date_default_timezone_set('UTC');
     }
index f4d3b646224d166ecc9412433a709d393741561b..40f26b12f9bcdae33546587565ca5db03dc3ef0f 100644 (file)
@@ -41,7 +41,7 @@ class HistoryTest extends \PHPUnit\Framework\TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->refHistory = new \ReferenceHistory();
@@ -57,7 +57,7 @@ class HistoryTest extends \PHPUnit\Framework\TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testHistory);
     }
index b5c938e1bf9f82517596de57129d28139d0eaf8a..cc50d2e355355d145ac14c038a4a3a0fa3d88dcf 100644 (file)
@@ -47,7 +47,7 @@ class InfoTest extends TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -67,7 +67,7 @@ class InfoTest extends TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
     }
index 6c2b36988c6741128934c3538d14b1496b3cc7b5..10dfe8bc3d24ce65b43c908bfa38735e887a9746 100644 (file)
@@ -56,7 +56,7 @@ class DeleteLinkTest extends \PHPUnit\Framework\TestCase
     /**
      * Before each test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -78,7 +78,7 @@ class DeleteLinkTest extends \PHPUnit\Framework\TestCase
     /**
      * After each test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
         @unlink(self::$testHistory);
index 8bb81dc8f8f1a7c313da25d9c8ce54c1c2dd9d25..ee42e259a362491e3f29b17297359bb3fa541a82 100644 (file)
@@ -55,7 +55,7 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase
     /**
      * Before each test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -74,7 +74,7 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase
     /**
      * After each test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
     }
index d02e6fad8284511a3a659402c9d0e79a30b2cdda..01c40c2f8121200fd174b8579ecd963e89a54f45 100644 (file)
@@ -55,7 +55,7 @@ class GetLinksTest extends \PHPUnit\Framework\TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -74,7 +74,7 @@ class GetLinksTest extends \PHPUnit\Framework\TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
     }
index 4e791a04191472ae33c67c175c5f51a977c0d4dd..b1c9008b16dc343b5d86765bb35962d1e17184fc 100644 (file)
@@ -70,7 +70,7 @@ class PostLinkTest extends TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -107,7 +107,7 @@ class PostLinkTest extends TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
         @unlink(self::$testHistory);
index 302cac0fb78a7f42205d2a1f8188b8a56644dee9..f582a2b536dac3fdf76c9894e4ed7d54b896d3d2 100644 (file)
@@ -62,7 +62,7 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -91,7 +91,7 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
         @unlink(self::$testHistory);
index c67488720b7b2617f8b6b509d1eef4036ed3dd58..b098057273ad5f4a5aa68e64d7ee329ba00093b1 100644 (file)
@@ -57,7 +57,7 @@ class DeleteTagTest extends \PHPUnit\Framework\TestCase
     /**
      * Before each test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -79,7 +79,7 @@ class DeleteTagTest extends \PHPUnit\Framework\TestCase
     /**
      * After each test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
         @unlink(self::$testHistory);
index b9a81f9bd9514ada7352326910a2ec1cc3639a41..f8ee10d9ca61a31fe2c18b5d233298a6e893c3d4 100644 (file)
@@ -53,7 +53,7 @@ class GetTagNameTest extends \PHPUnit\Framework\TestCase
     /**
      * Before each test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -72,7 +72,7 @@ class GetTagNameTest extends \PHPUnit\Framework\TestCase
     /**
      * After each test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
     }
index 53a3326d58fa0d97d51631bca83859c6cda749d9..ab666f2098b73978b0d5e4e2202391f8bd9e4bd3 100644 (file)
@@ -57,7 +57,7 @@ class GetTagsTest extends \PHPUnit\Framework\TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -78,7 +78,7 @@ class GetTagsTest extends \PHPUnit\Framework\TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
     }
index 2a3cc15a0d05e1ff5c21f2c6837cc222572cdbda..e0bc8663ec399ae66bdabdd1ed5a389b48a029c9 100644 (file)
@@ -62,7 +62,7 @@ class PutTagTest extends \PHPUnit\Framework\TestCase
     /**
      * Before every test, instantiate a new Api with its config, plugins and bookmarks.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
@@ -84,7 +84,7 @@ class PutTagTest extends \PHPUnit\Framework\TestCase
     /**
      * After every test, remove the test datastore.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$testDatastore);
         @unlink(self::$testHistory);
index a4ec10138b75c30bfb6a78c9726f3dc9f49229bf..aed4dc76aef3fe475e2df3ea14579a95deacd6a2 100644 (file)
@@ -66,7 +66,7 @@ class BookmarkFileServiceTest extends TestCase
      *
      * Resets test data for each test
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         if (file_exists(self::$testDatastore)) {
             unlink(self::$testDatastore);
index 33160eb0d88dd7d37bd69aa2c903a84515a7baf8..f1612e9bfdcbff41bc1a284f82aa82eb17b7a957 100644 (file)
@@ -11,7 +11,7 @@ class ConfigJsonTest extends \PHPUnit\Framework\TestCase
      */
     protected $configIO;
 
-    public function setUp()
+    protected function setUp(): void
     {
         $this->configIO = new ConfigJson();
     }
index 33830bc94bcc3584380b1a18259e4cf9ec101980..69456bce77b995c9a15427de9500f1bc680e7abb 100644 (file)
@@ -14,7 +14,7 @@ class ConfigManagerTest extends \PHPUnit\Framework\TestCase
      */
     protected $conf;
 
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager('tests/utils/config/configJson');
     }
index fb91b51ba6007e9c1452dea17fa6681076ff1bc1..a9aa80f5c89ba84690d40cbd54bc496d702b33c1 100644 (file)
@@ -15,7 +15,7 @@ class ConfigPhpTest extends \PHPUnit\Framework\TestCase
      */
     protected $configIO;
 
-    public function setUp()
+    protected function setUp(): void
     {
         $this->configIO = new ConfigPhp();
     }
index 2e7164321d85e7ca0e487fa69a8a6c1f64faeb82..25d640d38ec1f7e3db9b2c185307758152e75756 100644 (file)
@@ -17,7 +17,7 @@ class CachedPageTest extends \PHPUnit\Framework\TestCase
     /**
      * Create the cache directory if needed
      */
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         if (!is_dir(self::$testCacheDir)) {
             mkdir(self::$testCacheDir);
@@ -28,7 +28,7 @@ class CachedPageTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset the page cache
      */
-    public function setUp()
+    protected function setUp(): void
     {
         if (file_exists(self::$filename)) {
             unlink(self::$filename);
index cf48b00b63ce2c397a89cf836d1d9b04e812e9b9..9ea86c141bf62dab0c37893512f266fde09001d2 100644 (file)
@@ -25,7 +25,7 @@ class BookmarkDefaultFormatterTest extends TestCase
     /**
      * Initialize formatter instance.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php');
         $this->conf = new ConfigManager(self::$testConf);
index 3e72d1eea340988b4b69c4f94e9cfdc2907d2cbf..a7729416c24de6c11e45bf1229ae949658b573c7 100644 (file)
@@ -25,7 +25,7 @@ class BookmarkMarkdownFormatterTest extends TestCase
     /**
      * Initialize formatter instance.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php');
         $this->conf = new ConfigManager(self::$testConf);
index 4491b03586ad7fddb1da215df67924d251435b3a..76cf117237aa2045504c99c9e710ecf641ca2222 100644 (file)
@@ -25,7 +25,7 @@ class BookmarkRawFormatterTest extends TestCase
     /**
      * Initialize formatter instance.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php');
         $this->conf = new ConfigManager(self::$testConf);
index 5adf3ffd8dd2acfe20eb47fcf5ab58ed40f7c9ce..6aab6a611b32fbbba4eaf51db3622e520fe9e571 100644 (file)
@@ -24,7 +24,7 @@ class FormatterFactoryTest extends TestCase
     /**
      * Initialize FormatterFactory instance
      */
-    public function setUp()
+    protected function setUp(): void
     {
         copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php');
         $this->conf = new ConfigManager(self::$testConf);
index b8b7ca3a548358e98946e5d8833b748a40ecf27c..e412b5bc9e203515bfa4ae120421775cc0b46018 100644 (file)
@@ -27,7 +27,7 @@ class LanguagesFrTest extends \PHPUnit\Framework\TestCase
     /**
      * Init: force French
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new ConfigManager(self::$configFile);
         $this->conf->set('translation.language', 'fr');
@@ -36,7 +36,7 @@ class LanguagesFrTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset the locale since gettext seems to mess with it, making it too long
      */
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         if (! empty(getenv('UT_LOCALE'))) {
             setlocale(LC_ALL, getenv('UT_LOCALE'));
index 0884ad03ed2bd40837bc08ac4d1d60adb28820f6..92cf607c7e22f2c456b5109e52cdb8d60da9be14 100644 (file)
@@ -52,7 +52,7 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase
      *
      * Resets test data for each test
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         if (file_exists(self::$testDatastore)) {
             unlink(self::$testDatastore);
index ba9ec529bf208a1dcb6a5f98accea7ad0c909048..8223cc158f21c0780ce424541fc070587a5c37fd 100644 (file)
@@ -34,7 +34,7 @@ class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase
     /**
      * Instantiate linkFilter with ReferenceLinkDB data.
      */
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$refDB = new ReferenceLinkDB(true);
         self::$refDB->write(self::$testDatastore);
index 7c429811bb917a3fabaacd3adcc36f7b615b81ac..9b693dcb2eb21f46eceecbcb92b837640c337341 100644 (file)
@@ -40,7 +40,7 @@ class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase
     /**
      * Executed before each test.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php');
         $this->conf = new ConfigManager(self::$configFile);
@@ -754,7 +754,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
         if (isset($_SESSION['warnings'])) {
             unset($_SESSION['warnings']);
         }
-        
+
         $updater = new LegacyUpdater([], [], $this->conf, true, $_SESSION);
         $this->assertTrue($updater->updateMethodWebThumbnailer());
         $this->assertFalse($this->conf->exists('thumbnail'));
index 509da51d8ad2e576546b018b14671034bd901af2..13b85f3d832dfab4d4a7428d2c3d8fc755dea6f6 100644 (file)
@@ -54,7 +54,7 @@ class BookmarkExportTest extends TestCase
     /**
      * Instantiate reference data
      */
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         static::$conf = new ConfigManager('tests/utils/config/configJson');
         static::$conf->set('resource.datastore', static::$testDatastore);
index f678e26bd5ca8d3199242d33f6613bb36f7afecc..89ae4aa709b5cd2df82fb799ee63e89ed8c5b853 100644 (file)
@@ -75,7 +75,7 @@ class BookmarkImportTest extends TestCase
      */
     protected static $defaultTimeZone;
 
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$defaultTimeZone = date_default_timezone_get();
         // Timezone without DST for test consistency
@@ -85,7 +85,7 @@ class BookmarkImportTest extends TestCase
     /**
      * Resets test data before each test
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         if (file_exists(self::$testDatastore)) {
             unlink(self::$testDatastore);
@@ -104,12 +104,12 @@ class BookmarkImportTest extends TestCase
     /**
      * Delete history file.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         @unlink(self::$historyFilePath);
     }
 
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         date_default_timezone_set(self::$defaultTimeZone);
     }
index aa5c6988f639da5c9e8097897bdf151fa0b1b960..1f60d2897d45873e598cb7b911c6b5fd8190c868 100644 (file)
@@ -14,7 +14,7 @@ class PluginAddlinkTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset plugin path.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         PluginManager::$PLUGINS_PATH = 'plugins';
     }
index 9835dfa39ac7de4706d0f62b63cf86ed35f9d974..240bb4b25f3040a8cd678521e8c26713ab8bf2b7 100644 (file)
@@ -19,7 +19,7 @@ class PluginDefaultColorsTest extends TestCase
     /**
      * Reset plugin path
      */
-    public function setUp()
+    protected function setUp(): void
     {
         PluginManager::$PLUGINS_PATH = 'sandbox';
         mkdir(PluginManager::$PLUGINS_PATH . '/default_colors/');
@@ -32,7 +32,7 @@ class PluginDefaultColorsTest extends TestCase
     /**
      * Remove sandbox files and folder
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         if (file_exists('sandbox/default_colors/default_colors.css.template')) {
             unlink('sandbox/default_colors/default_colors.css.template');
index b7b6ce53fee211132aeee26030b3c1ffadd3249a..de1a1aeced099a5be2e65ca8f6acf7c3372d532d 100644 (file)
@@ -19,7 +19,7 @@ class PluginPlayvideosTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset plugin path
      */
-    public function setUp()
+    protected function setUp(): void
     {
         PluginManager::$PLUGINS_PATH = 'plugins';
     }
index e66f484edcdb6928ec4213ae918c2ebff2b36323..d30c370328df5042f713fb8fe9f3290e31d678a5 100644 (file)
@@ -21,7 +21,7 @@ class PluginPubsubhubbubTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset plugin path
      */
-    public function setUp()
+    protected function setUp(): void
     {
         PluginManager::$PLUGINS_PATH = 'plugins';
     }
index c9f8c733d40adcac140fc2bdb5fe8ab817123f6c..bc6be0ebe3bcd6936326b5d70905bc87491837de 100644 (file)
@@ -19,7 +19,7 @@ class PluginQrcodeTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset plugin path
      */
-    public function setUp()
+    protected function setUp(): void
     {
         PluginManager::$PLUGINS_PATH = 'plugins';
     }
index 797519210c63c5827da633d870e90de1b152d6c3..372929ea7874f18a69591f909a1508f8f77895eb 100644 (file)
@@ -15,7 +15,7 @@ class PluginWallabagTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset plugin path
      */
-    public function setUp()
+    protected function setUp(): void
     {
         PluginManager::$PLUGINS_PATH = 'plugins';
     }
index a3cd90765676c36920a9a58d2b0140133950a54d..4cb0d4cccc84763310ecf499384485418eebb006 100644 (file)
@@ -14,7 +14,7 @@ class WallabagInstanceTest extends \PHPUnit\Framework\TestCase
     /**
      * Reset plugin path
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->instance = 'http://some.url';
     }
index c258f45f566cb12a321730fa6a9f71e112648181..4aa7e179ac4dc3a21512af34688004d51448e3cb 100644 (file)
@@ -29,7 +29,7 @@ class PageCacheManagerTest extends TestCase
     /**
      * Populate the cache with dummy files
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->cacheManager = new PageCacheManager(static::$testCacheDir, true);
 
@@ -48,7 +48,7 @@ class PageCacheManagerTest extends TestCase
     /**
      * Remove dummycache folder after each tests.
      */
-    public function tearDown()
+    protected function tearDown(): void
     {
         array_map('unlink', glob(self::$testCacheDir . '/*'));
         rmdir(self::$testCacheDir);
index bba7c8ad76594c359b440e7d3a28f04fcdb293a3..2fef82f57fb111621d1bb440e05cdb823ecccd87 100644 (file)
@@ -32,7 +32,7 @@ class BanManagerTest extends TestCase
     /**
      * Prepare or reset test resources
      */
-    public function setUp()
+    protected function setUp(): void
     {
         if (file_exists($this->banFile)) {
             unlink($this->banFile);
index f242be0919685d9d5231e1ae20b96309471a136f..cc9aa647e243d971324e8d8960db9897ac0119ce 100644 (file)
@@ -63,7 +63,7 @@ class LoginManagerTest extends TestCase
     /**
      * Prepare or reset test resources
      */
-    public function setUp()
+    protected function setUp(): void
     {
         if (file_exists($this->banFile)) {
             unlink($this->banFile);
index 11a59f9c6e06b846623f02d465206220b807f085..27e3b1a9830830612fa58a83556660d3948189a7 100644 (file)
@@ -24,7 +24,7 @@ class SessionManagerTest extends TestCase
     /**
      * Assign reference data
      */
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$sidHashes = \ReferenceSessionIdHashes::getHashes();
     }
@@ -32,7 +32,7 @@ class SessionManagerTest extends TestCase
     /**
      * Initialize or reset test resources
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->conf = new \FakeConfigManager([
             'credentials.login' => 'johndoe',
index a7dd70bfc4b1a386bf27b7d8964984a458e23607..277f2fb08c193b4f55874029e1edacb98595b7d2 100644 (file)
@@ -42,7 +42,7 @@ class UpdaterTest extends TestCase
     /**
      * Executed before each test.
      */
-    public function setUp()
+    protected function setUp(): void
     {
         $this->refDB = new \ReferenceLinkDB();
         $this->refDB->write(self::$testDatastore);