diff --git a/src/PendingCalls/TestCall.php b/src/PendingCalls/TestCall.php index 85a5848e..a178018c 100644 --- a/src/PendingCalls/TestCall.php +++ b/src/PendingCalls/TestCall.php @@ -172,15 +172,23 @@ final class TestCall return $this; } + /** + * Skips the current test if the given test is running on given os family. + */ + public function skipOsFamily(string $osFamily): self + { + return $this->skip( + PHP_OS_FAMILY === $osFamily, + "This test is skipped on $osFamily.", + ); + } + /** * Skips the current test if the given test is running on Windows. */ public function skipOnWindows(): self { - return $this->skip( - PHP_OS_FAMILY === 'Windows', - 'This test is skipped on Windows.', - ); + return $this->skipOsFamily('Windows'); } /**