19 lines
528 B
PHP
19 lines
528 B
PHP
<?php
|
|
|
|
use App\Filament\Pages\SuperAdmin\StrutturaDatabase;
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
it('mounts struttura database page and calculates storage and domain stats', function () {
|
|
$user = User::factory()->create();
|
|
$this->actingAs($user);
|
|
|
|
$page = new StrutturaDatabase();
|
|
$stats = $page->getDatabaseStats();
|
|
|
|
expect($stats)->toBeArray()
|
|
->and($stats)->toHaveKeys(['total_tables', 'total_mb', 'domain_stats', 'tables']);
|
|
});
|