Skip to content

Commit

Permalink
Update PhpConfig::dump() to generate file which returns array.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jan 14, 2015
1 parent c3d23f4 commit 1884d7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Core/Configure/Engine/PhpConfig.php
Expand Up @@ -90,7 +90,7 @@ public function read($key)
*/
public function dump($key, array $data)
{
$contents = '<?php' . "\n" . '$config = ' . var_export($data, true) . ';';
$contents = '<?php' . "\n" . 'return ' . var_export($data, true) . ';';

$filename = $this->_getFilePath($key);
return file_put_contents($filename, $contents);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Core/Configure/Engine/PhpConfigTest.php
Expand Up @@ -145,7 +145,7 @@ public function testDump()
$this->assertTrue($result > 0);
$expected = <<<PHP
<?php
\$config = array (
return array (
'One' =>
array (
'two' => 'value',
Expand Down

0 comments on commit 1884d7b

Please sign in to comment.