tests: adds arch tests

This commit is contained in:
Nuno Maduro
2023-03-17 01:45:40 +00:00
parent b4b212a426
commit ae365324a8
3 changed files with 22 additions and 2 deletions

View File

@ -1,4 +1,8 @@
PASS Tests\Arch
✓ globals
✓ contracts
PASS Tests\Features\AfterAll
✓ deletes file after all
@ -938,4 +942,4 @@
PASS Tests\Visual\Version
✓ 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
View 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',
]);

View File

@ -15,6 +15,6 @@ $run = function () {
};
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');
});