mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
tests: adds arch tests
This commit is contained in:
@ -1,4 +1,8 @@
|
|||||||
|
|
||||||
|
PASS Tests\Arch
|
||||||
|
✓ globals
|
||||||
|
✓ contracts
|
||||||
|
|
||||||
PASS Tests\Features\AfterAll
|
PASS Tests\Features\AfterAll
|
||||||
✓ deletes file after all
|
✓ deletes file after all
|
||||||
|
|
||||||
@ -938,4 +942,4 @@
|
|||||||
PASS Tests\Visual\Version
|
PASS Tests\Visual\Version
|
||||||
✓ visual snapshot of help command output
|
✓ visual snapshot of help command output
|
||||||
|
|
||||||
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 18 skipped, 641 passed (1581 assertions)
|
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 18 skipped, 643 passed (1585 assertions)
|
||||||
16
tests/Arch.php
Normal file
16
tests/Arch.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Pest\Expectation;
|
||||||
|
|
||||||
|
test('globals')
|
||||||
|
->expect(['dd', 'dump', 'ray'])
|
||||||
|
->not->toBeUsed()
|
||||||
|
->ignoring(Expectation::class);
|
||||||
|
|
||||||
|
test('contracts')
|
||||||
|
->expect('Pest\Contracts')
|
||||||
|
->toOnlyUse([
|
||||||
|
'NunoMaduro\Collision\Contracts',
|
||||||
|
'Pest\Factories\TestCaseMethodFactory',
|
||||||
|
'Symfony\Component\Console',
|
||||||
|
]);
|
||||||
@ -15,6 +15,6 @@ $run = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
test('parallel', function () use ($run) {
|
test('parallel', function () use ($run) {
|
||||||
expect($run())->toContain('Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 15 skipped, 632 passed (1568 assertions)')
|
expect($run())->toContain('Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 15 skipped, 634 passed (1572 assertions)')
|
||||||
->toContain('Parallel: 3 processes');
|
->toContain('Parallel: 3 processes');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user