build(FakeShell::new(ListType::native())); self::assertSame([], $node->value()); self::assertEmpty($node->children()); } public function test_invalid_type_fails_assertion(): void { $this->expectException(AssertionError::class); (new RootNodeBuilder(new ListNodeBuilder()))->build(FakeShell::new(new FakeType())); } public function test_build_with_invalid_source_throws_exception(): void { $this->expectException(SourceMustBeIterable::class); $this->expectExceptionCode(1618739163); $this->expectExceptionMessage("Value 'foo' does not match type `list`."); (new RootNodeBuilder(new ListNodeBuilder()))->build(FakeShell::new(ListType::native(), 'foo')); } }