fix: package lock fingerprint

This commit is contained in:
nuno maduro
2026-07-18 01:10:01 +01:00
parent 9e79e491e2
commit 820fa08313
237 changed files with 2409 additions and 2100 deletions
+22 -15
View File
@@ -1,32 +1,39 @@
<?php
use Pest\Arch\Exceptions\ArchExpectationFailedException;
use Pest\Concerns\Retrievable;
use Pest\Expectations\EachExpectation;
use Pest\Expectations\HigherOrderExpectation;
use Tests\Fixtures\Arch\ToUseTrait\HasInheritedTrait\ChildClassExtendingParent;
use Tests\Fixtures\Arch\ToUseTrait\HasNestedTrait\NestedTrait;
use Tests\Fixtures\Arch\ToUseTrait\HasTrait\ParentClassWithTrait;
use Tests\Fixtures\Arch\ToUseTrait\HasTrait\TestTraitForInheritance;
test('pass', function () {
expect('Pest\Expectations\HigherOrderExpectation')->toUseTrait('Pest\Concerns\Retrievable')
->and('Pest\Expectations\EachExpectation')->not->toUseTrait('Pest\Concerns\Retrievable');
test('pass', function (): void {
expect(HigherOrderExpectation::class)->toUseTrait(Retrievable::class)
->and(EachExpectation::class)->not->toUseTrait(Retrievable::class);
});
test('failures', function () {
expect('Pest\Expectations\EachExpectation')->toUseTrait('Pest\Concerns\Foo');
test('failures', function (): void {
expect(EachExpectation::class)->toUseTrait('Pest\Concerns\Foo');
})->throws(ArchExpectationFailedException::class);
test('not failures', function () {
expect('Pest\Expectations\HigherOrderExpectation')->not->toUseTrait('Pest\Concerns\Retrievable');
test('not failures', function (): void {
expect(HigherOrderExpectation::class)->not->toUseTrait(Retrievable::class);
})->throws(ArchExpectationFailedException::class);
test('trait inheritance - direct usage', function () {
expect('Tests\Fixtures\Arch\ToUseTrait\HasTrait\ParentClassWithTrait')->toUseTrait('Tests\Fixtures\Arch\ToUseTrait\HasTrait\TestTraitForInheritance');
test('trait inheritance - direct usage', function (): void {
expect(ParentClassWithTrait::class)->toUseTrait(TestTraitForInheritance::class);
});
test('trait inheritance - inherited usage', function () {
expect('Tests\Fixtures\Arch\ToUseTrait\HasInheritedTrait\ChildClassExtendingParent')->toUseTrait('Tests\Fixtures\Arch\ToUseTrait\HasTrait\TestTraitForInheritance');
test('trait inheritance - inherited usage', function (): void {
expect(ChildClassExtendingParent::class)->toUseTrait(TestTraitForInheritance::class);
});
test('trait inheritance - negative case', function () {
expect('Tests\Fixtures\Arch\ToUseTrait\HasInheritedTrait\ChildClassExtendingParent')->not->toUseTrait('NonExistentTrait');
test('trait inheritance - negative case', function (): void {
expect(ChildClassExtendingParent::class)->not->toUseTrait('NonExistentTrait');
});
test('nested trait inheritance', function () {
expect('Tests\Fixtures\Arch\ToUseTrait\HasInheritedTrait\ChildClassExtendingParent')->toUseTrait('Tests\Fixtures\Arch\ToUseTrait\HasNestedTrait\NestedTrait');
test('nested trait inheritance', function (): void {
expect(ChildClassExtendingParent::class)->toUseTrait(NestedTrait::class);
});