From ae365324a80e5860b8dd303d883919c30bf73abc Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 17 Mar 2023 01:45:40 +0000 Subject: [PATCH] tests: adds arch tests --- tests/.snapshots/success.txt | 6 +++++- tests/Arch.php | 16 ++++++++++++++++ tests/Visual/Parallel.php | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tests/Arch.php diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index 5ae5f950..af38229f 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -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) \ No newline at end of file + Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 4 todos, 18 skipped, 643 passed (1585 assertions) \ No newline at end of file diff --git a/tests/Arch.php b/tests/Arch.php new file mode 100644 index 00000000..dc91eb3f --- /dev/null +++ b/tests/Arch.php @@ -0,0 +1,16 @@ +expect(['dd', 'dump', 'ray']) + ->not->toBeUsed() + ->ignoring(Expectation::class); + +test('contracts') + ->expect('Pest\Contracts') + ->toOnlyUse([ + 'NunoMaduro\Collision\Contracts', + 'Pest\Factories\TestCaseMethodFactory', + 'Symfony\Component\Console', + ]); diff --git a/tests/Visual/Parallel.php b/tests/Visual/Parallel.php index fd2fb38d..5a5f927c 100644 --- a/tests/Visual/Parallel.php +++ b/tests/Visual/Parallel.php @@ -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'); });