add ability to skip on multiple os families

This commit is contained in:
faissaloux
2023-03-31 22:09:45 +00:00
parent 1c1cb1e591
commit c1979f735f

View File

@ -175,13 +175,16 @@ final class TestCall
/** /**
* Skips the current test if the given test is running on given os family. * Skips the current test if the given test is running on given os family.
*/ */
public function skipOsFamily(string $osFamily): self public function skipOsFamily(string ...$osFamilies): self
{ {
foreach ($osFamilies as $osFamily) {
if (PHP_OS_FAMILY === $osFamily) {
return $this->skip( return $this->skip(
PHP_OS_FAMILY === $osFamily,
"This test is skipped on $osFamily.", "This test is skipped on $osFamily.",
); );
} }
}
}
/** /**
* Skips the current test if the given test is running on Windows. * Skips the current test if the given test is running on Windows.