From b7604d8b6dae15ed9fb8b0a8656c20ba8f2e4270 Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Wed, 29 Dec 2021 13:44:00 +0100 Subject: [PATCH] exclude IconvTest from running on Alpine Linux Signed-off-by: Dennis Riehle --- test/StringWrapper/IconvTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/StringWrapper/IconvTest.php b/test/StringWrapper/IconvTest.php index e9f78776..87306777 100644 --- a/test/StringWrapper/IconvTest.php +++ b/test/StringWrapper/IconvTest.php @@ -10,6 +10,10 @@ use function array_shift; use function extension_loaded; +use function file_exists; +use function file_get_contents; +use function is_readable; +use function str_contains; class IconvTest extends CommonStringWrapperTest { @@ -24,6 +28,13 @@ protected function setUp(): void } } + if (file_exists('/etc/os-release') && is_readable('/etc/os-release')) { + $osRelease = file_get_contents('/etc/os-release'); + if (stripos($osRelease, 'Alpine Linux') !== false) { + $this->markTestSkipped('iconv not properly supported on Alpine Linux'); + } + } + parent::setUp(); }