Skip to content

Commit

Permalink
Add test for overwriting scalar values with load().
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 16, 2014
1 parent 9fc56cb commit 037382e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/TestCase/Core/ConfigureTest.php
Expand Up @@ -323,12 +323,14 @@ public function testLoadMergeWithExistingData() {
Configure::write('my_key', 'value');
Configure::write('Read', 'old');
Configure::write('Deep.old', 'old');
Configure::write('TestAcl.classname', 'old');

Configure::load('var_test', 'test', true);
$this->assertEquals('value', Configure::read('Read'), 'Should load new data.');
$this->assertEquals('buried', Configure::read('Deep.Deeper.Deepest'), 'Should load new data');
$this->assertEquals('old', Configure::read('Deep.old'), 'Should not destroy old data.');
$this->assertEquals('value', Configure::read('my_key'), 'Should not destroy data.');
$this->assertEquals('Original', Configure::read('TestAcl.classname'), 'No arrays');
}

/**
Expand Down

0 comments on commit 037382e

Please sign in to comment.