public function testGetDefaultValueReturnsDefaultValueForPrototypes() { $node = new ArrayNode('root'); $prototype = new ArrayNode(null, $node); $node->setPrototype($prototype); $node->setDefaultValue(array('test')); $this->assertEquals(array('test'), $node->getDefaultValue()); }
/** * @expectedException \RuntimeException * @expectedExceptionMessage The node at path "foo" has no default value. */ public function testGetDefaultValueWithoutDefaultValue() { $node = new ArrayNode('foo'); $node->getDefaultValue(); }
public function getDefaultValue() { if ($this->children['type']->getDefaultValue()) { $this->prepareChildren($this->children['type']->getDefaultValue()); } return parent::getDefaultValue(); }