28 lines
725 B
PHP
28 lines
725 B
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use App\Enums\LicenseKind;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class LicenseKindTest extends TestCase
|
|
{
|
|
public function test_every_case_has_a_non_empty_label(): void
|
|
{
|
|
foreach (LicenseKind::cases() as $case) {
|
|
$this->assertNotSame('', $case->label());
|
|
}
|
|
}
|
|
|
|
public function test_rights_statement_case_value_and_label(): void
|
|
{
|
|
$this->assertSame('rights_statement', LicenseKind::RightsStatement->value);
|
|
$this->assertSame('Rights statement', LicenseKind::RightsStatement->label());
|
|
}
|
|
|
|
public function test_it_is_a_string_backed_enum(): void
|
|
{
|
|
$this->assertSame(LicenseKind::Mark, LicenseKind::from('mark'));
|
|
}
|
|
}
|