release aufiting
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
it('has valid module manifests', function (): void {
|
||||
$manifests = glob(base_path('Modules/*/module.json')) ?: [];
|
||||
|
||||
expect($manifests)->not->toBeEmpty();
|
||||
|
||||
foreach ($manifests as $manifest) {
|
||||
$decoded = json_decode((string) file_get_contents($manifest), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
expect($decoded)
|
||||
->toBeArray()
|
||||
->toHaveKey('name')
|
||||
->toHaveKey('providers');
|
||||
|
||||
expect($decoded['name'])->toBeString()->not->toBeEmpty();
|
||||
expect($decoded['providers'])->toBeArray();
|
||||
|
||||
foreach ($decoded['providers'] as $provider) {
|
||||
expect($provider)->toBeString();
|
||||
expect(Str::contains($provider, '\\'))->toBeTrue();
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user