Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 public function remove(string $key)
 {
     $this->root->remove($key);
 }