skip os family

This commit is contained in:
faissaloux
2023-03-31 22:03:18 +00:00
parent 49ddcbd66b
commit 1c1cb1e591

View File

@ -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');
}
/**