mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
feat: added onlyOn* methods to run the test only on a specific OS
This commit is contained in:
@ -223,6 +223,30 @@ final class TestCall
|
||||
return $this->skipOn('Linux', 'This test is skipped on [Linux].');
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the current test only if the given test is running on Windows.
|
||||
*/
|
||||
public function onlyOnWindows(): self
|
||||
{
|
||||
return $this->skipOnLinux()->skipOnMac();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the current test only if the given test is running on Mac.
|
||||
*/
|
||||
public function onlyOnMac(): self
|
||||
{
|
||||
return $this->skipOnWindows()->skipOnLinux();
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the current test only if the given test is running on Linux.
|
||||
*/
|
||||
public function onlyOnLinux(): self
|
||||
{
|
||||
return $this->skipOnWindows()->skipOnMac();
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips the current test if the given test is running on the given operating systems.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user