1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: James Valleroy <jvalleroy@mailbox.org>
Date: Tue, 4 Jan 2022 22:01:18 -0500
Subject: Skip tests that depend on working directory
Forwarded: not-needed
---
tests/front/controller/admin/ServerControllerTest.php | 2 ++
tests/helper/FileUtilsTest.php | 1 +
2 files changed, 3 insertions(+)
diff --git a/tests/front/controller/admin/ServerControllerTest.php b/tests/front/controller/admin/ServerControllerTest.php
index 355cce7..728e0d8 100644
--- a/tests/front/controller/admin/ServerControllerTest.php
+++ b/tests/front/controller/admin/ServerControllerTest.php
@@ -88,6 +88,7 @@ class ServerControllerTest extends TestCase
*/
public function testClearMainCache(): void
{
+ $this->markTestSkipped('Test depends on working directory.');
$this->container->conf = $this->createMock(ConfigManager::class);
$this->container->conf->method('get')->willReturnCallback(function (string $key, $default) {
if ($key === 'resource.page_cache') {
@@ -134,6 +135,7 @@ class ServerControllerTest extends TestCase
*/
public function testClearThumbnailsCache(): void
{
+ $this->markTestSkipped('Test depends on working directory.');
$this->container->conf = $this->createMock(ConfigManager::class);
$this->container->conf->method('get')->willReturnCallback(function (string $key, $default) {
if ($key === 'resource.page_cache') {
diff --git a/tests/helper/FileUtilsTest.php b/tests/helper/FileUtilsTest.php
index 7bf031a..e1207b2 100644
--- a/tests/helper/FileUtilsTest.php
+++ b/tests/helper/FileUtilsTest.php
@@ -128,6 +128,7 @@ class FileUtilsTest extends TestCase
*/
public function testReadNotReadable()
{
+ $this->markTestSkipped('Test depends on working directory.');
touch(self::$file);
chmod(self::$file, 0220);
$this->assertEquals(null, FileUtils::readFlatDB(self::$file));
|