This commit is contained in:
2019-03-02 15:54:10 +01:00
parent bc8fba19d4
commit 17f223d517
32 changed files with 366 additions and 288 deletions

34
tests/TestEnum.php Normal file
View 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)
);
}
}