Browse Source

Update use of getMock() in TestCase.

ADmad 9 years ago
parent
commit
d29af6dd55
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/TestSuite/TestCase.php

+ 4 - 1
src/TestSuite/TestCase.php

@@ -608,7 +608,10 @@ abstract class TestCase extends PHPUnit_Framework_TestCase
         $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']);