aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-26 15:08:39 +0200
committerArthurHoaro <arthur@hoa.ro>2020-09-26 15:08:39 +0200
commit8f60e1206e45e67c96a7630d4ff94e72fe875f09 (patch)
tree20621c50f6822c42589acffc45d475f46586c69d /tests/api
parent24225f63324bd1118b008518abfc82a136ad997e (diff)
downloadShaarli-8f60e1206e45e67c96a7630d4ff94e72fe875f09.tar.gz
Shaarli-8f60e1206e45e67c96a7630d4ff94e72fe875f09.tar.zst
Shaarli-8f60e1206e45e67c96a7630d4ff94e72fe875f09.zip
Comply with PHPUnit V8: setup/teardown functions must return void
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/ApiMiddlewareTest.php4
-rw-r--r--tests/api/ApiUtilsTest.php2
-rw-r--r--tests/api/controllers/history/HistoryTest.php4
-rw-r--r--tests/api/controllers/info/InfoTest.php4
-rw-r--r--tests/api/controllers/links/DeleteLinkTest.php4
-rw-r--r--tests/api/controllers/links/GetLinkIdTest.php4
-rw-r--r--tests/api/controllers/links/GetLinksTest.php4
-rw-r--r--tests/api/controllers/links/PostLinkTest.php4
-rw-r--r--tests/api/controllers/links/PutLinkTest.php4
-rw-r--r--tests/api/controllers/tags/DeleteTagTest.php4
-rw-r--r--tests/api/controllers/tags/GetTagNameTest.php4
-rw-r--r--tests/api/controllers/tags/GetTagsTest.php4
-rw-r--r--tests/api/controllers/tags/PutTagTest.php4
13 files changed, 25 insertions, 25 deletions
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);