mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-06-27 07:29:20 +00:00
pouet
This commit is contained in:
34
tests/TestEnum.php
Normal file
34
tests/TestEnum.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class TestEnum extends TestCase {
|
||||
|
||||
public function testInstantiateEnum(): void {
|
||||
$this->expectException(Error::class);
|
||||
new Enum();
|
||||
}
|
||||
|
||||
public function testValidOption(): void {
|
||||
$this->assertEquals(
|
||||
0,
|
||||
OptionTypes::String
|
||||
);
|
||||
}
|
||||
|
||||
public function testIsValidName(): void {
|
||||
$this->assertEquals(
|
||||
true,
|
||||
OptionTypes::isValidName("String")
|
||||
);
|
||||
$this->assertEquals(
|
||||
false,
|
||||
OptionTypes::isValidName("Sting")
|
||||
);
|
||||
$this->assertEquals(
|
||||
false,
|
||||
OptionTypes::isValidName("string", true)
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user