32 lines
783 B
PHP
32 lines
783 B
PHP
<?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);
|
|
}
|
|
}
|