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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
From: James Valleroy <jvalleroy@mailbox.org>
Date: Sun, 3 Dec 2023 22:05:39 -0500
Subject: Skip tests that require internet access
Forwarded: not-needed
---
tests/ThumbnailerTest.php | 2 ++
tests/front/controller/admin/ServerControllerTest.php | 1 +
tests/helper/ApplicationUtilsTest.php | 1 +
tests/http/HttpUtils/GetHttpUrlTest.php | 1 +
4 files changed, 5 insertions(+)
diff --git a/tests/ThumbnailerTest.php b/tests/ThumbnailerTest.php
index 2ea5568..19d32bd 100644
--- a/tests/ThumbnailerTest.php
+++ b/tests/ThumbnailerTest.php
@@ -52,6 +52,7 @@ class ThumbnailerTest extends TestCase
*/
public function testThumbnailAllValid()
{
+ $this->markTestSkipped('Test requires internet access.');
$thumb = $this->thumbnailer->get('https://gitlab.com/shaarli/Shaarli');
$this->assertNotFalse($thumb);
$image = imagecreatefromstring(file_get_contents($thumb));
@@ -64,6 +65,7 @@ class ThumbnailerTest extends TestCase
*/
public function testThumbnailCommonValid()
{
+ $this->markTestSkipped('Test requires internet access.');
$this->conf->set('thumbnails.mode', Thumbnailer::MODE_COMMON);
$thumb = $this->thumbnailer->get('https://imgur.com/jlFgGpe');
$this->assertNotFalse($thumb);
diff --git a/tests/front/controller/admin/ServerControllerTest.php b/tests/front/controller/admin/ServerControllerTest.php
index 728e0d8..2982c64 100644
--- a/tests/front/controller/admin/ServerControllerTest.php
+++ b/tests/front/controller/admin/ServerControllerTest.php
@@ -51,6 +51,7 @@ class ServerControllerTest extends TestCase
*/
public function testIndex(): void
{
+ $this->markTestSkipped('Test requires internet access.');
$request = $this->createMock(Request::class);
$response = new Response();
diff --git a/tests/helper/ApplicationUtilsTest.php b/tests/helper/ApplicationUtilsTest.php
index f23960e..d50d151 100644
--- a/tests/helper/ApplicationUtilsTest.php
+++ b/tests/helper/ApplicationUtilsTest.php
@@ -42,6 +42,7 @@ class ApplicationUtilsTest extends \Shaarli\TestCase
*/
public function testGetVersionCode()
{
+ $this->markTestSkipped('Test requires internet access.');
$testTimeout = 10;
$this->assertEquals(
diff --git a/tests/http/HttpUtils/GetHttpUrlTest.php b/tests/http/HttpUtils/GetHttpUrlTest.php
index 3e0b032..760ac08 100644
--- a/tests/http/HttpUtils/GetHttpUrlTest.php
+++ b/tests/http/HttpUtils/GetHttpUrlTest.php
@@ -32,6 +32,7 @@ class GetHttpUrlTest extends \Shaarli\TestCase
*/
public function testGetInvalidRemoteUrl()
{
+ $this->markTestSkipped('Test depends on DNS setup.');
list($headers, $content) = @get_http_response('http://non.existent', 1);
$this->assertFalse($headers);
$this->assertFalse($content);
|