Skip to content

Commit

Permalink
Fix fatal error.
Browse files Browse the repository at this point in the history
getMockForModel() was breaking as ClassRegistry is no longer seeded with
config data by the test suite. This method will need to be reworked in
the future.
  • Loading branch information
markstory committed Oct 20, 2013
1 parent b6accd9 commit 2ebf5d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cake/TestSuite/TestCase.php
Expand Up @@ -594,7 +594,7 @@ protected function skipUnless($condition, $message = '') {
* @return Model
*/
public function getMockForModel($model, $methods = array(), $config = array()) {
$config += ClassRegistry::config('Model');
$config += (array)ClassRegistry::config('Model');

$modelClass = App::className($model, 'Model');
list(, $name) = namespaceSplit($modelClass);
Expand Down

0 comments on commit 2ebf5d7

Please sign in to comment.