Skip to content

Commit

Permalink
Adds skipOnPhp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Jan 11, 2024
1 parent 82a64b4 commit 128b06d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion skipping-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,17 @@ it('has home', function() {
})->onlyOnWindows(); // or onlyOnMac() or onlyOnLinux() ...
```

You may even invoke the `skip()` method within your `beforeEach()` hook to conveniently skip an entire test file.
Sometimes, you may want to skip a test on a specific PHP version. In these cases, you may use the `skipOnPhp()` method.

```php
it('has home', function () {
//
})->skipOnPhp('>=8.0.0');
```

The valid operators for the `skipOnPhp()` method are `>`, `>=`, `<`, and `<=`.

Finally, you may even invoke the `skip()` method within your `beforeEach()` hook to conveniently skip an entire test file.

```php
beforeEach(function () {
Expand Down

0 comments on commit 128b06d

Please sign in to comment.