license: built full stack, test and documentation
This commit is contained in:
27
backend/tests/Unit/LicenseKindTest.php
Normal file
27
backend/tests/Unit/LicenseKindTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user