Total Complexity | 6 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | final class UnionTypeTest extends TypeTest |
||
17 | { |
||
18 | protected function createType() : Type |
||
19 | { |
||
20 | return new UnionType(new IntegerType(), new ObjectType(stdClass::class), new NullType()); |
||
21 | } |
||
22 | |||
23 | public function testDescribe() : void |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @return null[][]|object[][]|int[][] |
||
30 | */ |
||
31 | public function validValidateValuesProvider() : iterable |
||
32 | { |
||
33 | yield [null]; |
||
|
|||
34 | yield [new stdClass()]; |
||
35 | yield [123]; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return mixed[][] |
||
40 | */ |
||
41 | public function invalidValidateValuesProvider() : iterable |
||
42 | { |
||
43 | yield [true]; |
||
44 | yield [0.0]; |
||
45 | yield ['0']; |
||
46 | yield [[0]]; |
||
47 | yield [new DateTimeImmutable()]; |
||
48 | } |
||
49 | |||
50 | public function testAcceptsNull() : void |
||
53 | } |
||
54 | |||
55 | public function testNotAcceptsNullStoringNotNullAcceptingType() : void |
||
60 | } |
||
61 | } |
||
62 |