/** * @group ZF-8234 */ public function testRender() { $config = new Config(array('test' => 'foo', 'bar' => array(0 => 'baz', 1 => 'foo'))); $writer = new ArrayWriter(); $configString = $writer->setConfig($config)->render(); // build string line by line as we are trailing-whitespace sensitive. $expected = "<?php\n"; $expected .= "return array (\n"; $expected .= " 'test' => 'foo',\n"; $expected .= " 'bar' => \n"; $expected .= " array (\n"; $expected .= " 0 => 'baz',\n"; $expected .= " 1 => 'foo',\n"; $expected .= " ),\n"; $expected .= ");\n"; $this->assertEquals($expected, $configString); }
public function saveInstallationManifest() { if ($this->manifest->get('_dirty', false)) { unset($this->manifest->{'_dirty'}); $path = $this->getOptions()->getManifestDir() . '/manifest.php'; $writer = new ArrayWriter(); $writer->write($path, $this->manifest); } return $this; }