Skip to content

Commit

Permalink
Fix E_USER_DEPRECATED error when mocking a model
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepRoebroek committed Apr 16, 2017
1 parent bfa6e09 commit 4755a47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TestSuite/TestCase.php
Expand Up @@ -667,8 +667,8 @@ public function getMockForModel($alias, array $methods = [], array $options = []
}
}

if (stripos($mock->table(), 'mock') === 0) {
$mock->table(Inflector::tableize($baseClass));
if (stripos($mock->getTable(), 'mock') === 0) {
$mock->setTable(Inflector::tableize($baseClass));
}

TableRegistry::set($baseClass, $mock);
Expand Down

0 comments on commit 4755a47

Please sign in to comment.