Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Jan 6, 2025
1 parent 695b395 commit c32caff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/ReflectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
use Spatie\StructureDiscoverer\Tests\Fakes\FakeSubChildClass;
use Spatie\StructureDiscoverer\Tests\Fakes\FakeSubChildInterface;
use Spatie\StructureDiscoverer\Tests\Fakes\FakeTrait;
use Spatie\StructureDiscoverer\Tests\Fakes\FakeWithAnonymousClass;
use Spatie\StructureDiscoverer\Tests\Fakes\FakeWithMultipleClasses;
use Spatie\StructureDiscoverer\Tests\Fakes\Nested\FakeNestedClass;
use Spatie\StructureDiscoverer\Tests\Fakes\Nested\FakeNestedInterface;
use Spatie\StructureDiscoverer\Tests\Fakes\OtherNested\FakeOtherNestedClass;
Expand Down Expand Up @@ -116,7 +118,9 @@
FakeOtherNestedClass::class,
FakeSubChildInterface::class,
FakeSubChildClass::class,
FakeWithMultipleClasses::class,
FakeClassDepender::class,
FakeInterfaceDepender::class,
FakeWithAnonymousClass::class,
]);
});
6 changes: 5 additions & 1 deletion tests/StructureDiscovererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
FakeOtherNestedClass::class,
FakeSubChildClass::class,
FakeClassDepender::class,
FakeWithAnonymousClass::class,
FakeWithMultipleClasses::class,
FakeWithMultipleClassesSub::class,
],
],
'interfaces' => [
Expand Down Expand Up @@ -508,7 +511,7 @@ public function satisfies(DiscoveredStructure $discoveredData): bool
});

it('can discover enums with interfaces', function () {
$found = Discover::in(__DIR__.'/Fakes')
$found = Discover::in(__DIR__ . '/Fakes')
->implementing(FakeChildInterface::class)
->enums()
->get();
Expand All @@ -518,6 +521,7 @@ public function satisfies(DiscoveredStructure $discoveredData): bool
FakeStringEnum::class,
FakeIntEnum::class,
]);
});

it('can parse anonymous classes', function () {
$found = Discover::in(__DIR__ . '/Fakes')->get();
Expand Down

0 comments on commit c32caff

Please sign in to comment.