| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class NullabilityTest extends TestCase |
||
| 14 | { |
||
| 15 | public function test_array_allows_null(): void |
||
| 16 | { |
||
| 17 | $test = new NullableSimpleObjectArray([new SimpleObject('valid'), null]); |
||
| 18 | self::assertNull($test[1]); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function test_array_no_allows_null(): void |
||
| 22 | { |
||
| 23 | $this->expectException(InvalidTypeException::class); |
||
| 24 | new NonNullableSimpleObjectArray([new SimpleObject('invalid'), null]); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function test_set_null(): void |
||
| 33 | } |
||
| 34 | |||
| 35 | public function test_unset_null(): void |
||
| 43 |