Skip to content
Permalink
Browse files

Update use of getMock() in TestCase.

  • Loading branch information...
ADmad committed Jun 4, 2016
1 parent 3cc1f9a commit d29af6dd55ff62f9afde0454a5dc8377329c3666
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/TestSuite/TestCase.php
@@ -608,7 +608,10 @@ public function getMockForModel($alias, array $methods = [], array $options = []
$options += ['alias' => $baseClass, 'connection' => $connection];
$options += TableRegistry::config($alias);
$mock = $this->getMock($options['className'], $methods, [$options]);
$mock = $this->getMockBuilder($options['className'])
->setMethods($methods)
->setConstructorArgs([$options])
->getMock();
if (empty($options['entityClass']) && $mock->entityClass() === '\Cake\ORM\Entity') {
$parts = explode('\\', $options['className']);

0 comments on commit d29af6d

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