mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 02:52:12 +02:00
Compare commits
11 Commits
4d550cecfd
...
79bc7a8257
| Author | SHA1 | Date | |
|---|---|---|---|
| 79bc7a8257 | |||
| 40b88b62ef | |||
| e3361bc321 | |||
| fc48c1bd1e | |||
| 92e76eb5ab | |||
| da726beffc | |||
| 4ef12b9aac | |||
| bd22f478b8 | |||
| eeaac34cf6 | |||
| b9b07d8983 | |||
| 6aa7d2f891 |
2
.github/workflows/static.yml
vendored
2
.github/workflows/static.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
dependency-version: [prefer-stable]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.4",
|
||||
"brianium/paratest": "^7.22.3",
|
||||
"brianium/paratest": "^7.22.4",
|
||||
"nunomaduro/collision": "^8.9.4",
|
||||
"nunomaduro/termwind": "^2.4.0",
|
||||
"pestphp/pest-plugin": "^5.0.0",
|
||||
@ -63,7 +63,7 @@
|
||||
"pestphp/pest-dev-tools": "^5.0.0",
|
||||
"pestphp/pest-plugin-browser": "^5.0.0",
|
||||
"pestphp/pest-plugin-type-coverage": "^5.0.0",
|
||||
"psy/psysh": "^0.12.22"
|
||||
"psy/psysh": "^0.12.23"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
|
||||
@ -163,7 +163,7 @@ final class Kernel
|
||||
$this->terminate();
|
||||
|
||||
if (is_array($error = error_get_last())) {
|
||||
if (! in_array($error['type'], [E_ERROR, E_CORE_ERROR], true)) {
|
||||
if (! in_array($error['type'], [E_ERROR, E_COMPILE_ERROR, E_CORE_ERROR], true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Pest;
|
||||
|
||||
use Laravel\Pao\Execution;
|
||||
use Pest\Support\View;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
@ -28,6 +29,10 @@ final class KernelDump
|
||||
*/
|
||||
public function enable(): void
|
||||
{
|
||||
if (class_exists(Execution::class) && Execution::running()) {
|
||||
return;
|
||||
}
|
||||
|
||||
ob_start(function (string $message): string {
|
||||
$this->buffer .= $message;
|
||||
|
||||
@ -68,6 +73,10 @@ final class KernelDump
|
||||
|
||||
$type = 'INFO';
|
||||
|
||||
if (is_array($error = error_get_last()) && in_array($error['type'], [E_ERROR, E_COMPILE_ERROR, E_CORE_ERROR], true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->isInternalError($this->buffer)) {
|
||||
$type = 'ERROR';
|
||||
$this->buffer = str_replace(
|
||||
@ -107,7 +116,6 @@ final class KernelDump
|
||||
*/
|
||||
private function isInternalError(string $output): bool
|
||||
{
|
||||
return str_contains($output, 'An error occurred inside PHPUnit.')
|
||||
|| str_contains($output, 'Fatal error');
|
||||
return str_contains($output, 'An error occurred inside PHPUnit.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ namespace Pest;
|
||||
|
||||
function version(): string
|
||||
{
|
||||
return '5.0.0-rc.7';
|
||||
return '5.0.0-rc.9';
|
||||
}
|
||||
|
||||
function testDirectory(string $file = ''): string
|
||||
|
||||
@ -151,7 +151,6 @@ final class WrapperRunner implements RunnerInterface
|
||||
public function run(): int
|
||||
{
|
||||
$directory = dirname(__DIR__);
|
||||
assert($directory !== '');
|
||||
ExcludeList::addDirectory($directory);
|
||||
TestResultFacade::init();
|
||||
EventFacade::instance()->seal();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
Pest Testing Framework 5.0.0-rc.7.
|
||||
Pest Testing Framework 5.0.0-rc.9.
|
||||
|
||||
USAGE: pest <file> [options]
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
|
||||
Pest Testing Framework 5.0.0-rc.7.
|
||||
Pest Testing Framework 5.0.0-rc.9.
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
✓ preset → strict → ignoring ['Pest\Plugins\Tia\BaselineSync', 'usleep']
|
||||
✓ preset → security → ignoring ['eval', 'str_shuffle', 'exec', …]
|
||||
✓ globals
|
||||
✓ contracts
|
||||
|
||||
PASS Tests\Environments\Windows
|
||||
✓ global functions are loaded
|
||||
@ -74,9 +73,9 @@
|
||||
↓ is marked as todo 3
|
||||
↓ shouldBeMarkedAsTodo
|
||||
|
||||
PASS Tests\Features\Coverage
|
||||
WARN Tests\Features\Coverage
|
||||
✓ it has plugin
|
||||
✓ it adds coverage if --coverage exist
|
||||
- it adds coverage if --coverage exist → Coverage is not available
|
||||
✓ it adds coverage if --min exist
|
||||
✓ it generates coverage based on file input
|
||||
|
||||
@ -1940,4 +1939,4 @@
|
||||
✓ pass with dataset with ('my-datas-set-value')
|
||||
✓ within describe → pass with dataset with ('my-datas-set-value')
|
||||
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 40 todos, 34 skipped, 1332 passed (3020 assertions)
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 40 todos, 35 skipped, 1330 passed (3013 assertions)
|
||||
@ -33,13 +33,3 @@ arch('globals')
|
||||
->expect(['dd', 'dump', 'ray', 'die', 'var_dump', 'sleep'])
|
||||
->not->toBeUsed()
|
||||
->ignoring(Expectation::class);
|
||||
|
||||
arch('contracts')
|
||||
->expect('Pest\Contracts')
|
||||
->toOnlyUse([
|
||||
'NunoMaduro\Collision\Contracts',
|
||||
'Pest\Factories\TestCaseMethodFactory',
|
||||
'Symfony\Component\Console',
|
||||
'Pest\Arch\Contracts',
|
||||
'Pest\PendingCalls',
|
||||
])->toBeInterfaces();
|
||||
|
||||
@ -24,13 +24,13 @@ test('parallel', function () use ($run) {
|
||||
$file = file_get_contents(__FILE__);
|
||||
$file = preg_replace(
|
||||
'/\$expected = \'.*?\';/',
|
||||
"\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 26 skipped, 1316 passed (2969 assertions)';",
|
||||
"\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1314 passed (2962 assertions)';",
|
||||
$file,
|
||||
);
|
||||
file_put_contents(__FILE__, $file);
|
||||
}
|
||||
|
||||
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 26 skipped, 1316 passed (2969 assertions)';
|
||||
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1314 passed (2962 assertions)';
|
||||
|
||||
expect($output)
|
||||
->toContain("Tests: {$expected}")
|
||||
|
||||
Reference in New Issue
Block a user