feature test su institution
This commit is contained in:
27
backend/tests/Unit/InstitutionLinkTypeTest.php
Normal file
27
backend/tests/Unit/InstitutionLinkTypeTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\Enums\InstitutionLinkType;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class InstitutionLinkTypeTest extends TestCase
|
||||
{
|
||||
public function test_every_case_has_a_non_empty_label(): void
|
||||
{
|
||||
foreach (InstitutionLinkType::cases() as $case) {
|
||||
$this->assertNotSame('', $case->label());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_official_case_value_and_label(): void
|
||||
{
|
||||
$this->assertSame('official', InstitutionLinkType::Official->value);
|
||||
$this->assertSame('Official website', InstitutionLinkType::Official->label());
|
||||
}
|
||||
|
||||
public function test_it_is_a_string_backed_enum(): void
|
||||
{
|
||||
$this->assertSame(InstitutionLinkType::Social, InstitutionLinkType::from('social'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user