Skip to content

Commit

Permalink
Update exception type to a class that exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 23, 2013
1 parent 680e13d commit f0164dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cake/Test/TestCase/Utility/HashTest.php
Expand Up @@ -1523,7 +1523,7 @@ public function testCombine() {
/**
* test combine() giving errors on key/value length mismatches.
*
* @expectedException CakeException
* @expectedException RuntimeException
* @return void
*/
public function testCombineErrorMissingValue() {
Expand All @@ -1537,7 +1537,7 @@ public function testCombineErrorMissingValue() {
/**
* test combine() giving errors on key/value length mismatches.
*
* @expectedException CakeException
* @expectedException RuntimeException
* @return void
*/
public function testCombineErrorMissingKey() {
Expand Down
4 changes: 2 additions & 2 deletions Cake/Utility/Hash.php
Expand Up @@ -362,7 +362,7 @@ public static function remove(array $data, $path) {
* @param string $groupPath A dot-separated string.
* @return array Combined array
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::combine
* @throws CakeException CakeException When keys and values count is unequal.
* @throws \RuntimeException When keys and values count is unequal.
*/
public static function combine(array $data, $keyPath, $valuePath = null, $groupPath = null) {
if (empty($data)) {
Expand Down Expand Up @@ -390,7 +390,7 @@ public static function combine(array $data, $keyPath, $valuePath = null, $groupP
}

if (count($keys) !== count($vals)) {
throw new CakeException(__d(
throw new \RuntimeException(__d(
'cake_dev',
'Hash::combine() needs an equal number of keys + values.'
));
Expand Down

0 comments on commit f0164dd

Please sign in to comment.