1 | <?php |
||
7 | class TypeTest extends \PHPUnit_Framework_TestCase |
||
8 | { |
||
9 | public function testGetTypesShouldDoReturnArray() |
||
10 | { |
||
11 | $expected = [1, 2, 3]; |
||
12 | $this->assertEquals($expected, Type::getTypes()); |
||
13 | } |
||
14 | |||
15 | public function testValidShouldReturnTrue() |
||
16 | { |
||
17 | $this->assertTrue(Type::isValid(1)); |
||
18 | $this->assertTrue(Type::isValid(2)); |
||
19 | $this->assertTrue(Type::isValid(3)); |
||
20 | } |
||
21 | |||
22 | public function testValuesInvalidShouldReturnFalse() |
||
23 | { |
||
24 | $this->assertFalse(Type::isValid(0)); |
||
25 | $this->assertFalse(Type::isValid(4)); |
||
26 | } |
||
27 | } |
||
28 |