From 837e7e28c7eceb1d017fddaddd955df0607a86b3 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Wed, 10 Oct 2018 21:39:11 +0200
Subject: [PATCH] Mark test as skipped of required POSIX-function is not
 available

---
 tests/lib/SimpleSAML/Utils/SystemTest.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/lib/SimpleSAML/Utils/SystemTest.php b/tests/lib/SimpleSAML/Utils/SystemTest.php
index e39370e94..07424e359 100644
--- a/tests/lib/SimpleSAML/Utils/SystemTest.php
+++ b/tests/lib/SimpleSAML/Utils/SystemTest.php
@@ -214,6 +214,10 @@ class SystemTest extends TestCase
      */
     public function testGetTempDirBadOwner()
     {
+        if (!function_exists('posix_getuid')) {
+            static::markTestSkipped('POSIX-functions not available;  skipping!');
+        }
+
         $bad_uid = posix_getuid() + 1;
 
         $tempdir = $this->root_directory . DIRECTORY_SEPARATOR . self::DEFAULTTEMPDIR;
-- 
GitLab