*/ function packageComponentPaths(): Collection { $components = realpath(__DIR__.'/../../resources/views/components'); return collect(Blade::getAnonymousComponentPaths()) ->filter(fn (array $entry): bool => realpath($entry['path']) === $components) ->values(); } it('registers the components without a prefix', function () { expect(packageComponentPaths())->toHaveCount(1) ->and(packageComponentPaths()->first()['prefix'])->toBeNull(); }); it('registers the components under a configured prefix', function () { config(['livewire-material.prefix' => 'm-']); $provider = app()->getProvider(LivewireMaterialServiceProvider::class); (fn () => $this->registerComponents())->call($provider); expect(packageComponentPaths()->last()['prefix'])->toBe('m-'); }); it('keeps blade-icons from registering an that would shadow ours', function () { expect(Blade::getClassComponentAliases())->not->toHaveKey('icon'); });