Compare commits

...

14 Commits

Author SHA1 Message Date
863a0cc837 release: v2.34.5 2024-03-22 08:44:19 +00:00
126a84a63e chore: bumps dependencies 2024-03-22 08:44:13 +00:00
d519e40b95 chore: adjusts workflow 2024-03-15 21:14:22 +00:00
6a1161ead8 release: v2.34.4 2024-03-14 19:44:18 +00:00
a1b3547dd6 chore: fixes paratest version 2024-03-14 19:42:03 +00:00
b9e3146a47 release: v2.34.3 2024-03-14 19:40:23 +00:00
ce1607cba9 chore: bumps phpunit 2024-03-14 19:40:16 +00:00
ac07bc1770 chore: override changes 2024-03-14 19:40:03 +00:00
521a41dd10 fix: no duplicate --no-output 2024-03-14 19:39:45 +00:00
1b68b340e8 chore: fixes static analysis 2024-03-14 19:39:31 +00:00
853f6efce6 release: v2.34.2 2024-03-11 18:05:47 +00:00
62a9a78ee2 chore: bumps dependencies 2024-03-11 18:05:37 +00:00
78d9fd31d0 release: v2.34.1 2024-02-28 15:15:55 +00:00
602b696348 release: v2.34.0 2024-02-17 10:06:53 +00:00
10 changed files with 32 additions and 31 deletions

View File

@ -3,8 +3,6 @@ name: Tests
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
tests:

View File

@ -19,14 +19,14 @@
"require": {
"php": "^8.1.0",
"brianium/paratest": "^7.3.1",
"nunomaduro/collision": "^7.10.0|^8.1.0",
"nunomaduro/termwind": "^1.15.1|^2.0.0",
"nunomaduro/collision": "^7.10.0|^8.1.1",
"nunomaduro/termwind": "^1.15.1|^2.0.1",
"pestphp/pest-plugin": "^2.1.1",
"pestphp/pest-plugin-arch": "^2.7.0",
"phpunit/phpunit": "^10.5.10"
"phpunit/phpunit": "^10.5.15"
},
"conflict": {
"phpunit/phpunit": ">10.5.10",
"phpunit/phpunit": ">10.5.15",
"sebastian/exporter": "<5.1.0",
"webmozart/assert": "<1.11.0"
},
@ -52,8 +52,8 @@
},
"require-dev": {
"pestphp/pest-dev-tools": "^2.16.0",
"pestphp/pest-plugin-type-coverage": "^2.8.0",
"symfony/process": "^6.4.0|^7.0.3"
"pestphp/pest-plugin-type-coverage": "^2.8.1",
"symfony/process": "^6.4.0|^7.0.4"
},
"minimum-stability": "dev",
"prefer-stable": true,

View File

@ -59,7 +59,6 @@ use function file_get_contents;
use function file_put_contents;
use function is_array;
use function is_dir;
use function is_file;
use function json_decode;
use function json_encode;
use function Pest\version;
@ -129,13 +128,15 @@ final class DefaultResultCache implements ResultCache
public function load(): void
{
if (! is_file($this->cacheFilename)) {
$contents = @file_get_contents($this->cacheFilename);
if ($contents === false) {
return;
}
$data = json_decode(
file_get_contents($this->cacheFilename),
true
$contents,
true,
);
if ($data === null) {

View File

@ -59,19 +59,14 @@ use function array_map;
*/
final class TestSuiteFilterProcessor
{
private Factory $filterFactory;
public function __construct(Factory $factory = new Factory)
{
$this->filterFactory = $factory;
}
/**
* @throws Event\RuntimeException
* @throws FilterNotConfiguredException
*/
public function process(Configuration $configuration, TestSuite $suite): void
{
$factory = new Factory;
if (! $configuration->hasFilter() &&
! $configuration->hasGroups() &&
! $configuration->hasExcludeGroups() &&
@ -83,21 +78,21 @@ final class TestSuiteFilterProcessor
}
if ($configuration->hasExcludeGroups()) {
$this->filterFactory->addExcludeGroupFilter(
$factory->addExcludeGroupFilter(
$configuration->excludeGroups()
);
}
if (Only::isEnabled()) {
$this->filterFactory->addIncludeGroupFilter(['__pest_only']);
$factory->addIncludeGroupFilter(['__pest_only']);
} elseif ($configuration->hasGroups()) {
$this->filterFactory->addIncludeGroupFilter(
$factory->addIncludeGroupFilter(
$configuration->groups()
);
}
if ($configuration->hasTestsCovering()) {
$this->filterFactory->addIncludeGroupFilter(
$factory->addIncludeGroupFilter(
array_map(
static fn (string $name): string => '__phpunit_covers_'.$name,
$configuration->testsCovering()
@ -106,7 +101,7 @@ final class TestSuiteFilterProcessor
}
if ($configuration->hasTestsUsing()) {
$this->filterFactory->addIncludeGroupFilter(
$factory->addIncludeGroupFilter(
array_map(
static fn (string $name): string => '__phpunit_uses_'.$name,
$configuration->testsUsing()
@ -115,12 +110,12 @@ final class TestSuiteFilterProcessor
}
if ($configuration->hasFilter()) {
$this->filterFactory->addNameFilter(
$factory->addNameFilter(
$configuration->filter()
);
}
$suite->injectFilter($this->filterFactory);
$suite->injectFilter($factory);
Event\Facade::emitter()->testSuiteFiltered(
Event\TestSuite\TestSuiteBuilder::from($suite)

View File

@ -19,11 +19,11 @@ final class BootOverrides implements Bootstrapper
*/
public const FILES = [
'c7b9c8a96006dea314204a8f09a8764e51ce0b9b79aadd58da52e8c328db4870' => 'Runner/Filter/NameFilterIterator.php',
'52b2574e96269aca1bb2d41bbf418c3bcf23dd21d14c66f90789025c309e39df' => 'Runner/ResultCache/DefaultResultCache.php',
'c7c09ab7c9378710b27f761a4b2948196cbbdf2a73e4389bcdca1e7c94fa9c21' => 'Runner/ResultCache/DefaultResultCache.php',
'bc8718c89264f65800beabc23e51c6d3bcff87dfc764a12179ef5dbfde272c8b' => 'Runner/TestSuiteLoader.php',
'f41e48d6cb546772a7de4f8e66b6b7ce894a5318d063eb52e354d206e96c701c' => 'TextUI/Command/Commands/WarmCodeCoverageCacheCommand.php',
'cb7519f2d82893640b694492cf7ec9528da80773cc1d259634181b5d393528b5' => 'TextUI/Output/Default/ProgressPrinter/Subscriber/TestSkippedSubscriber.php',
'6db25ee539e9b12b1fb4e044a0a93410e015bc983ecdd3909cd394fe44ae8c95' => 'TextUI/TestSuiteFilterProcessor.php',
'2f06e4b1a9f3a24145bfc7ea25df4f124117f940a2cde30a04d04d5678006bff' => 'TextUI/TestSuiteFilterProcessor.php',
'ef64a657ed9c0067791483784944107827bf227c7e3200f212b6751876b99e25' => 'Event/Value/ThrowableBuilder.php',
'c78f96e34b98ed01dd8106539d59b8aa8d67f733274118b827c01c5c4111c033' => 'Logging/JUnit/JunitXmlLogger.php',
];

View File

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

View File

@ -22,6 +22,10 @@ final class Printer implements HandlesArguments
return $arguments;
}
if (in_array('--no-output', $arguments, true)) {
return $arguments;
}
return $this->pushArgument('--no-output', $arguments);
}
}

View File

@ -64,6 +64,8 @@ final class Exporter
continue;
}
assert(is_array($data));
$result[] = $context->contains($data[$key]) !== false
? '*RECURSION*'
: sprintf('[%s]', $this->shortenedRecursiveExport($data[$key], $context));

View File

@ -1,5 +1,5 @@
Pest Testing Framework 2.33.6.
Pest Testing Framework 2.34.5.
USAGE: pest <file> [options]
@ -55,6 +55,7 @@
--stop-on-notice ............. Stop after first test that triggered a notice
--stop-on-skipped ............................ Stop after first skipped test
--stop-on-incomplete ...................... Stop after first incomplete test
--fail-on-empty-test-suite Signal failure using shell exit code when no tests were run
--fail-on-warning Signal failure using shell exit code when a warning was triggered
--fail-on-risky Signal failure using shell exit code when a test was considered risky
--fail-on-deprecation Signal failure using shell exit code when a deprecation was triggered

View File

@ -1,3 +1,3 @@
Pest Testing Framework 2.33.6.
Pest Testing Framework 2.34.5.