public function testIsRemovingChildNode() { $typeHandler = $this->prophesize(TypeHandler::class); $typeHandler->getType('string')->willReturn(new BaseNode()); $base = new BaseNode(); $base->setTypeHandler($typeHandler->reveal()); $child = $base->add('foobar', 'string', ['required' => false]); $this->assertCount(1, $base->getChildren()); $base->remove('foobar'); $this->assertCount(0, $base->getChildren()); }
public function remove(string $key) { $this->root->remove($key); }