Skip to content
Permalink
Browse files

Clean up formatting.

Refs #10912
  • Loading branch information...
markstory committed Aug 3, 2017
1 parent b47e445 commit 7c2ad08da5ffe3e9156fe44e57583335789857a6
Showing with 30 additions and 11 deletions.
  1. +30 −11 lib/Cake/TestSuite/CakeTestCase.php
@@ -741,10 +741,15 @@ protected function skipUnless($condition, $message = '') {
* @deprecated Use `getMockBuilder()` or `createMock()` in new unit tests.
* @see https://phpunit.de/manual/current/en/test-doubles.html
*/
protected function _buildMock($originalClassName, $methods = array(),
array $arguments = array(), $mockClassName = '',
$callOriginalConstructor = true, $callOriginalClone = true,
$callAutoload = true) {
protected function _buildMock(
$originalClassName,
$methods = array(),
array $arguments = array(),
$mockClassName = '',
$callOriginalConstructor = true,
$callOriginalClone = true,
$callAutoload = true
) {
$MockBuilder = $this->getMockBuilder($originalClassName);
if (!empty($methods)) {
$MockBuilder = $MockBuilder->setMethods($methods);
@@ -797,11 +802,18 @@ protected function _buildMock($originalClassName, $methods = array(),
* @deprecated Use `getMockBuilder()` or `createMock()` in new unit tests.
* @see https://phpunit.de/manual/current/en/test-doubles.html
*/
public function getMock($originalClassName, $methods = array(),
array $arguments = array(), $mockClassName = '',
$callOriginalConstructor = true, $callOriginalClone = true,
$callAutoload = true, $cloneArguments = false,
$callOriginalMethods = false, $proxyTarget = null) {
public function getMock(
$originalClassName,
$methods = array(),
array $arguments = array(),
$mockClassName = '',
$callOriginalConstructor = true,
$callOriginalClone = true,
$callAutoload = true,
$cloneArguments = false,
$callOriginalMethods = false,
$proxyTarget = null
) {
$phpUnitVersion = PHPUnit_Runner_Version::id();
if (version_compare($phpUnitVersion, '5.7.0', '<')) {
return parent::getMock($originalClassName, $methods, $arguments,
@@ -817,8 +829,15 @@ public function getMock($originalClassName, $methods = array(),
if ($proxyTarget !== null) {
throw new InvalidArgumentException('$proxyTarget parameter is not supported');
}
return $this->_buildMock($originalClassName, $methods, $arguments,
$mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload);
return $this->_buildMock(
$originalClassName,
$methods,
$arguments,
$mockClassName,
$callOriginalConstructor,
$callOriginalClone,
$callAutoload
);
}
/**

0 comments on commit 7c2ad08

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