Skip to content
Permalink
Browse files

Fix fatal error.

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 15, 2013
1 parent b6accd9 commit 2ebf5d7c9043f0fe753b1d685f5a03fd4d1170f1
Showing with 1 addition and 1 deletion.
  1. +1 −1 Cake/TestSuite/TestCase.php
@@ -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);

0 comments on commit 2ebf5d7

Please sign in to comment.
You can’t perform that action at this time.