chore: stricter pint rules

This commit is contained in:
Benjamin Nussbaum 2025-06-17 21:30:59 +02:00
parent 16b2e8436e
commit e535496a1e
30 changed files with 134 additions and 83 deletions

View file

@ -36,7 +36,7 @@ test('device log casts device_timestamp to datetime', function () {
'device_timestamp' => $timestamp,
]);
expect($log->device_timestamp)->toBeInstanceOf(\Carbon\Carbon::class)
expect($log->device_timestamp)->toBeInstanceOf(Carbon\Carbon::class)
->and($log->device_timestamp->timestamp)->toBe($timestamp->timestamp);
});
@ -45,7 +45,7 @@ test('device log factory creates valid data', function () {
$log = DeviceLog::factory()->create();
expect($log->device_id)->toBeInt()
->and($log->device_timestamp)->toBeInstanceOf(\Carbon\Carbon::class)
->and($log->device_timestamp)->toBeInstanceOf(Carbon\Carbon::class)
->and($log->log_entry)->toBeArray()
->and($log->log_entry)->toHaveKeys(['creation_timestamp', 'device_status_stamp', 'log_id', 'log_message', 'log_codeline', 'log_sourcefile', 'additional_info']);
});

View file

@ -2,7 +2,7 @@
use App\Models\Plugin;
uses(\Illuminate\Foundation\Testing\RefreshDatabase::class);
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
test('plugin has required attributes', function () {
$plugin = Plugin::factory()->create([
@ -26,7 +26,7 @@ test('plugin automatically generates uuid on creation', function () {
});
test('plugin can have custom uuid', function () {
$uuid = \Illuminate\Support\Str::uuid();
$uuid = Illuminate\Support\Str::uuid();
$plugin = Plugin::factory()->create(['uuid' => $uuid]);
expect($plugin->uuid)->toBe($uuid);