public function testWriteAndReadOriginalFile() { $config = new JsonConfig(__DIR__ . '/files/allsections.json', null, array('skip_extends' => true)); $writer = new JsonWriter(array('config' => $config, 'filename' => $this->_tempName)); $writer->write(); $config = new JsonConfig($this->_tempName, null); $this->assertEquals('multi', $config->staging->one->two->three, var_export($config->toArray(), 1)); $config = new JsonConfig($this->_tempName, null, array('skip_extends' => true)); $this->assertFalse(isset($config->staging->one)); }
public function testNestedConfigSetsAreArrays() { $config = new JsonConfig(__DIR__ . '/_files/nested.json', 'testing'); $array = $config->toArray(); $this->assertInternalType('array', $array['definitions'][0]); }