mirror of
https://github.com/pestphp/pest.git
synced 2026-03-05 23:37:22 +01:00
Fixes tests
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
|
||||
Pest Testing Framework 3.8.2.
|
||||
Pest Testing Framework 4.0.0-alpha.1.
|
||||
|
||||
USAGE: pest <file> [options]
|
||||
|
||||
@ -68,6 +68,7 @@
|
||||
--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
|
||||
--fail-on-phpunit-deprecation Signal failure using shell exit code when a PHPUnit deprecation was triggered
|
||||
--fail-on-phpunit-notice Signal failure using shell exit code when a PHPUnit notice was triggered
|
||||
--fail-on-notice Signal failure using shell exit code when a notice was triggered
|
||||
--fail-on-skipped Signal failure using shell exit code when a test was skipped
|
||||
--fail-on-incomplete Signal failure using shell exit code when a test was marked incomplete
|
||||
@ -88,6 +89,7 @@
|
||||
--display-skipped ........................ Display details for skipped tests
|
||||
--display-deprecations . Display details for deprecations triggered by tests
|
||||
--display-phpunit-deprecations .... Display details for PHPUnit deprecations
|
||||
--display-phpunit-notices .............. Display details for PHPUnit notices
|
||||
--display-errors ............. Display details for errors triggered by tests
|
||||
--display-notices ........... Display details for notices triggered by tests
|
||||
--display-warnings ......... Display details for warnings triggered by tests
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
|
||||
Pest Testing Framework 3.8.2.
|
||||
Pest Testing Framework 4.0.0-alpha.1.
|
||||
|
||||
|
||||
@ -2,57 +2,57 @@
|
||||
|
||||
use Pest\Expectation;
|
||||
|
||||
// arch()->preset()->php()->ignoring([
|
||||
// Expectation::class,
|
||||
// 'debug_backtrace',
|
||||
// 'var_export',
|
||||
// 'xdebug_info',
|
||||
// ]);
|
||||
arch()->preset()->php()->ignoring([
|
||||
Expectation::class,
|
||||
'debug_backtrace',
|
||||
'var_export',
|
||||
'xdebug_info',
|
||||
]);
|
||||
|
||||
// arch()->preset()->strict()->ignoring([
|
||||
// 'usleep',
|
||||
// ]);
|
||||
arch()->preset()->strict()->ignoring([
|
||||
'usleep',
|
||||
]);
|
||||
|
||||
// arch()->preset()->security()->ignoring([
|
||||
// 'eval',
|
||||
// 'str_shuffle',
|
||||
// 'exec',
|
||||
// 'unserialize',
|
||||
// 'extract',
|
||||
// 'assert',
|
||||
// ]);
|
||||
arch()->preset()->security()->ignoring([
|
||||
'eval',
|
||||
'str_shuffle',
|
||||
'exec',
|
||||
'unserialize',
|
||||
'extract',
|
||||
'assert',
|
||||
]);
|
||||
|
||||
// arch('globals')
|
||||
// ->expect(['dd', 'dump', 'ray', 'die', 'var_dump', 'sleep'])
|
||||
// ->not->toBeUsed()
|
||||
// ->ignoring(Expectation::class);
|
||||
arch('globals')
|
||||
->expect(['dd', 'dump', 'ray', 'die', 'var_dump', 'sleep'])
|
||||
->not->toBeUsed()
|
||||
->ignoring(Expectation::class);
|
||||
|
||||
// arch('dependencies')
|
||||
// ->expect('Pest')
|
||||
// ->toOnlyUse([
|
||||
// 'dd',
|
||||
// 'dump',
|
||||
// 'expect',
|
||||
// 'uses',
|
||||
// 'Termwind',
|
||||
// 'ParaTest',
|
||||
// 'Pest\Arch',
|
||||
// 'Pest\Mutate\Contracts\Configuration',
|
||||
// 'Pest\Mutate\Decorators\TestCallDecorator',
|
||||
// 'Pest\Mutate\Repositories\ConfigurationRepository',
|
||||
// 'Pest\Plugin',
|
||||
// 'NunoMaduro\Collision',
|
||||
// 'Whoops',
|
||||
// 'Symfony\Component\Console',
|
||||
// 'Symfony\Component\Process',
|
||||
// ])->ignoring(['Composer', 'PHPUnit', 'SebastianBergmann']);
|
||||
arch('dependencies')
|
||||
->expect('Pest')
|
||||
->toOnlyUse([
|
||||
'dd',
|
||||
'dump',
|
||||
'expect',
|
||||
'uses',
|
||||
'Termwind',
|
||||
'ParaTest',
|
||||
'Pest\Arch',
|
||||
'Pest\Mutate\Contracts\Configuration',
|
||||
'Pest\Mutate\Decorators\TestCallDecorator',
|
||||
'Pest\Mutate\Repositories\ConfigurationRepository',
|
||||
'Pest\Plugin',
|
||||
'NunoMaduro\Collision',
|
||||
'Whoops',
|
||||
'Symfony\Component\Console',
|
||||
'Symfony\Component\Process',
|
||||
])->ignoring(['Composer', 'PHPUnit', 'SebastianBergmann']);
|
||||
|
||||
// arch('contracts')
|
||||
// ->expect('Pest\Contracts')
|
||||
// ->toOnlyUse([
|
||||
// 'NunoMaduro\Collision\Contracts',
|
||||
// 'Pest\Factories\TestCaseMethodFactory',
|
||||
// 'Symfony\Component\Console',
|
||||
// 'Pest\Arch\Contracts',
|
||||
// 'Pest\PendingCalls',
|
||||
// ])->toBeInterfaces();
|
||||
arch('contracts')
|
||||
->expect('Pest\Contracts')
|
||||
->toOnlyUse([
|
||||
'NunoMaduro\Collision\Contracts',
|
||||
'Pest\Factories\TestCaseMethodFactory',
|
||||
'Symfony\Component\Console',
|
||||
'Pest\Arch\Contracts',
|
||||
'Pest\PendingCalls',
|
||||
])->toBeInterfaces();
|
||||
|
||||
@ -10,4 +10,4 @@ test('preset invalid name', function () {
|
||||
$this->preset()->myAnotherFramework();
|
||||
})->throws(InvalidArgumentException::class, 'The preset [myAnotherFramework] does not exist. The available presets are [php, laravel, strict, security, relaxed, myFramework].');
|
||||
|
||||
// arch()->preset()->myFramework();
|
||||
arch()->preset()->myFramework();
|
||||
|
||||
Reference in New Issue
Block a user