mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 17:57:23 +01:00
add ability to skip on multiple os families
This commit is contained in:
@ -175,12 +175,15 @@ 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
|
||||||
{
|
{
|
||||||
return $this->skip(
|
foreach ($osFamilies as $osFamily) {
|
||||||
PHP_OS_FAMILY === $osFamily,
|
if (PHP_OS_FAMILY === $osFamily) {
|
||||||
"This test is skipped on $osFamily.",
|
return $this->skip(
|
||||||
);
|
"This test is skipped on $osFamily.",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user