Skip to content

Commit

Permalink
exclude IconvTest from running on Alpine Linux
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Riehle <webmaster@riehle-web.com>
  • Loading branch information
driehle committed Dec 29, 2021
1 parent 3826d56 commit b7604d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/StringWrapper/IconvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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();
}

Expand Down

0 comments on commit b7604d8

Please sign in to comment.