Compare commits

..

7 Commits

7 changed files with 31 additions and 7 deletions

View File

@ -52,7 +52,7 @@
}, },
"require-dev": { "require-dev": {
"pestphp/pest-dev-tools": "^2.16.0", "pestphp/pest-dev-tools": "^2.16.0",
"pestphp/pest-plugin-type-coverage": "^2.4.0", "pestphp/pest-plugin-type-coverage": "^2.5.0",
"symfony/process": "^6.3.4" "symfony/process": "^6.3.4"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",

View File

@ -233,6 +233,30 @@ final class TestCall
: $this; : $this;
} }
/**
* Skips the current test unless the given test is running on Windows.
*/
public function onlyOnWindows(): self
{
return $this->skipOnMac()->skipOnLinux();
}
/**
* Skips the current test unless the given test is running on Mac.
*/
public function onlyOnMac(): self
{
return $this->skipOnWindows()->skipOnLinux();
}
/**
* Skips the current test unless the given test is running on Linux.
*/
public function onlyOnLinux(): self
{
return $this->skipOnWindows()->skipOnMac();
}
/** /**
* Repeats the current test the given number of times. * Repeats the current test the given number of times.
*/ */

View File

@ -6,7 +6,7 @@ namespace Pest;
function version(): string function version(): string
{ {
return '2.24.3'; return '2.25.0';
} }
function testDirectory(string $file = ''): string function testDirectory(string $file = ''): string

View File

@ -54,8 +54,8 @@ final class Result
$returnCode = self::FAILURE_EXIT; $returnCode = self::FAILURE_EXIT;
} }
$warnings = $result->numberOfTestsWithTestTriggeredPhpunitWarningEvents() + $warnings = $result->numberOfTestsWithTestTriggeredPhpunitWarningEvents()
+count($result->warnings()) + count($result->warnings())
+ count($result->phpWarnings()); + count($result->phpWarnings());
if ($configuration->failOnWarning() && $warnings > 0) { if ($configuration->failOnWarning() && $warnings > 0) {

View File

@ -190,7 +190,7 @@ final class Reflection
} }
$arguments[$parameter->getName()] = implode('|', array_map( $arguments[$parameter->getName()] = implode('|', array_map(
static fn (ReflectionNamedType $type): string => $type->getName(), static fn (ReflectionNamedType $type): string => $type->getName(), // @phpstan-ignore-line
($types instanceof ReflectionNamedType) ($types instanceof ReflectionNamedType)
? [$types] // NOTE: normalize as list of to handle unions ? [$types] // NOTE: normalize as list of to handle unions
: $types->getTypes(), : $types->getTypes(),

View File

@ -1,5 +1,5 @@
Pest Testing Framework 2.24.3. Pest Testing Framework 2.25.0.
USAGE: pest <file> [options] USAGE: pest <file> [options]

View File

@ -1,3 +1,3 @@
Pest Testing Framework 2.24.3. Pest Testing Framework 2.25.0.