expectException(AssertionError::class); (new RootNodeBuilder(new ShapedArrayNodeBuilder(true)))->build(FakeShell::any()); } public function test_build_with_null_source_throws_exception(): void { $type = new ShapedArrayType(new ShapedArrayElement(new StringValueType('foo'), new FakeType('SomeType'))); $this->expectException(SourceMustBeIterable::class); $this->expectExceptionCode(1618739163); $this->expectExceptionMessage("Cannot be empty and must be filled with a value matching type `array{foo: SomeType}`."); (new RootNodeBuilder(new ShapedArrayNodeBuilder(true)))->build(FakeShell::new($type)); } }