Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
🏗️ Add architecture testing
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Oct 30, 2023
1 parent edef58d commit ab366e5
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/ArchTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

test('globals')
->expect(['dd', 'dump', 'ray'])
->not->toBeUsed();

test('classes')
->expect('Sikessem\Values')
->toUseStrictTypes();

test('abstract classes')
->expect('Sikessem\Values\Abstracts')
->classes()
->toBeAbstract()
->toHavePrefix('Abstract');

test('base classes')
->expect('Sikessem\Values\Bases')
->classes()
->toBeAbstract()
->toHavePrefix('Base')
->toHaveConstructor();

test('contracts')
->expect('Sikessem\Values\Contracts')
->interfaces()
->toOnlyBeUsedIn('Sikessem\Values', 'Sikessem\Values\Contracts');

test('concerns')
->expect('Sikessem\Values\Concerns')
->traits()
->toOnlyBeUsedIn('Sikessem\Values', 'Sikessem\Values\Concerns');

0 comments on commit ab366e5

Please sign in to comment.