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 <[email protected]>
  • Loading branch information
driehle committed Dec 29, 2021
1 parent 3826d56 commit 6695cc7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 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 stripos;

class IconvTest extends CommonStringWrapperTest
{
Expand All @@ -24,6 +28,19 @@ protected function setUp(): void
}
}

/**
* ext-iconv is not properly supported on Alpine Linux, hence, we skip the tests for now
*
* @see https://github.com/nunomaduro/phpinsights/issues/43
* @see https://github.com/docker-library/php/issues/240#issuecomment-353678474
*/
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 6695cc7

Please sign in to comment.