mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-16 16:37:47 +00:00
chore: phpstan fixes, rector
This commit is contained in:
parent
d19a079b8a
commit
b097b0a7d7
7 changed files with 15 additions and 17 deletions
|
|
@ -156,9 +156,7 @@ test('can delete a device palette', function (): void {
|
|||
->call('deleteDevicePalette', $palette->id);
|
||||
|
||||
expect(DevicePalette::find($palette->id))->toBeNull();
|
||||
$component->assertSet('devicePalettes', function ($palettes) use ($palette) {
|
||||
return $palettes->where('id', $palette->id)->isEmpty();
|
||||
});
|
||||
$component->assertSet('devicePalettes', fn ($palettes) => $palettes->where('id', $palette->id)->isEmpty());
|
||||
});
|
||||
|
||||
test('can duplicate a device palette', function (): void {
|
||||
|
|
@ -467,7 +467,7 @@ YAML;
|
|||
$zipFile = UploadedFile::fake()->createWithContent('invalid-default.zip', $zipContent);
|
||||
$pluginImportService = new PluginImportService();
|
||||
|
||||
expect(fn () => $pluginImportService->importFromZip($zipFile, $user))
|
||||
expect(fn (): Plugin => $pluginImportService->importFromZip($zipFile, $user))
|
||||
->toThrow(Exception::class, 'Validation Error: The default value for multistring fields like `api_key` cannot contain commas.');
|
||||
});
|
||||
|
||||
|
|
@ -497,7 +497,7 @@ YAML;
|
|||
$zipFile = UploadedFile::fake()->createWithContent('invalid-placeholder.zip', $zipContent);
|
||||
$pluginImportService = new PluginImportService();
|
||||
|
||||
expect(fn () => $pluginImportService->importFromZip($zipFile, $user))
|
||||
expect(fn (): Plugin => $pluginImportService->importFromZip($zipFile, $user))
|
||||
->toThrow(Exception::class, 'Validation Error: The placeholder value for multistring fields like `api_key` cannot contain commas.');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue