Fix data exports UI and scope format
This commit is contained in:
31
tests/Unit/DataExportTableTest.php
Normal file
31
tests/Unit/DataExportTableTest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\Enums\DataExportScope;
|
||||
use App\Filament\Resources\DataExportResource\Tables\DataExportTable;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DataExportTableTest extends TestCase
|
||||
{
|
||||
public function test_formats_scope_from_enum(): void
|
||||
{
|
||||
$label = DataExportTable::formatScope(DataExportScope::TENANT);
|
||||
|
||||
$this->assertSame(__('admin.data_exports.scope.tenant'), $label);
|
||||
}
|
||||
|
||||
public function test_formats_scope_from_string(): void
|
||||
{
|
||||
$label = DataExportTable::formatScope('event');
|
||||
|
||||
$this->assertSame(__('admin.data_exports.scope.event'), $label);
|
||||
}
|
||||
|
||||
public function test_formats_scope_from_null(): void
|
||||
{
|
||||
$label = DataExportTable::formatScope(null);
|
||||
|
||||
$this->assertSame('—', $label);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user