Skip to content

Commit

Permalink
phpcs fixes
Browse files Browse the repository at this point in the history
and add a test for when deleting should fail
  • Loading branch information
AD7six committed Mar 25, 2014
1 parent 680be10 commit 26b7d3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Core/InstanceConfigTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ protected function _configWrite($key, $value = null) {
/**
* Delete a single config key
*
* @throws Cake\Error\Exception if attempting to clobber existing config
* @param string $key
* @return void
*/
Expand Down
12 changes: 11 additions & 1 deletion tests/TestCase/Core/InstanceConfigTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public function testDeleteSimple() {
$this->object->config(),
'deleted keys should not be present'
);

}

/**
Expand Down Expand Up @@ -340,4 +339,15 @@ public function testDeleteNested() {
);
}

/**
* testSetClobber
*
* @expectedException \Exception
* @expectedExceptionMessage Cannot unset a.nested.value.whoops
* @return void
*/
public function testDeleteClobber() {
$this->object->config('a.nested.value.whoops', null);
}

}

0 comments on commit 26b7d3d

Please sign in to comment.