normalize(false); } /** * @expectedException InvalidArgumentException */ public function testSetDefaultValueThrowsExceptionWhenNotAnArray() { $node = new ArrayNode('root'); $node->setDefaultValue('test'); } /** * @expectedException RuntimeException */ public function testSetDefaultValueThrowsExceptionWhenNotAnPrototype() { $node = new ArrayNode('root'); $node->setDefaultValue(array ('test')); } public function testGetDefaultValueReturnsAnEmptyArrayForPrototypes() { $node = new ArrayNode('root'); $prototype = new ArrayNode(null, $node); $node->setPrototype($prototype); $this->assertEmpty($node->getDefaultValue()); } 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()); } }