File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed
tests/Unit/DTO/Type/ArrayType Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -76,23 +76,11 @@ public function testUnmarshalling(): void
7676
7777 public function testSetNullToNotNullable (): void
7878 {
79- try {
80- $ this ->unmarshal ([
81- 'foo ' => null ,
82- ], new ArrayDto ());
79+ $ dto = $ this ->unmarshal ([
80+ 'foo ' => null ,
81+ ], new ArrayDto ());
8382
84- $ this ->fail ('Null value should not be allowed. ' );
85- } catch (\Throwable $ e ) {
86- $ this ->assertStringContainsString (
87- '`foo` ' ,
88- $ e ->getMessage (),
89- );
90- $ this ->assertInstanceOf (\InvalidArgumentException::class, $ e ->getPrevious ());
91- $ this ->assertStringContainsString (
92- 'Passed value must be a type of array, but null given ' ,
93- $ e ->getPrevious ()->getMessage (),
94- );
95- }
83+ self ::assertSame ([], $ dto ->foo );
9684 }
9785
9886 protected function getTypeMatchers (): array
You can’t perform that action at this time.
0 commit comments