Skip to content

Commit

Permalink
Fixed code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
bancer committed Jul 15, 2017
1 parent 93696b6 commit 7ba52d0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/Cake/TestSuite/CakeTestCase.php
Expand Up @@ -718,7 +718,7 @@ protected function skipUnless($condition, $message = '') {
/**
* Returns a mock object for the specified class.
*
* @param string $originalClassName
* @param string $originalClassName The class name of the object to be mocked.
* @param array $methods By default, all methods of the given class are replaced
* with a test double that just returns NULL unless a return value is configured
* using will($this->returnValue()), for instance.
Expand All @@ -731,18 +731,18 @@ protected function skipUnless($condition, $message = '') {
* with a dummy implementation by default).
* @param string $mockClassName The fourth (optional) parameter can be used to
* specify a class name for the generated test double class.
* @param boolean $callOriginalConstructor The fifth (optional) parameter can be
* @param bool $callOriginalConstructor The fifth (optional) parameter can be
* used to disable the call to the original class' constructor.
* @param boolean $callOriginalClone The sixth (optional) parameter can be used
* @param bool $callOriginalClone The sixth (optional) parameter can be used
* to disable the call to the original class' clone constructor.
* @param boolean $callAutoload The seventh (optional) parameter can be used to
* @param bool $callAutoload The seventh (optional) parameter can be used to
* disable __autoload() during the generation of the test double class.
* @param boolean $cloneArguments Not supported.
* @param boolean $callOriginalMethods Not supported.
* @param bool $cloneArguments Not supported.
* @param bool $callOriginalMethods Not supported.
* @param string $proxyTarget Not supported.
* @return object
* @throws InvalidArgumentException
* @deprecated Use `getMockBuilder()` or `createMock` in new unit tests.
* @throws InvalidArgumentException When not supported parameters are set.
* @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(),
Expand All @@ -767,22 +767,22 @@ public function getMock($originalClassName, $methods = array(),
$MockBuilder = $MockBuilder->setMockClassName($mockClassName);
}
if ($callOriginalConstructor !== true) {
$MockBuilder= $MockBuilder->disableOriginalConstructor();
$MockBuilder = $MockBuilder->disableOriginalConstructor();
}
if ($callOriginalClone !== true) {
$MockBuilder= $MockBuilder->disableOriginalClone();
$MockBuilder = $MockBuilder->disableOriginalClone();
}
if ($callAutoload !== true) {
$MockBuilder= $MockBuilder->disableAutoload();
$MockBuilder = $MockBuilder->disableAutoload();
}
if ($cloneArguments) {
throw new CakeException('$cloneArguments parameter is not supported');
throw new InvalidArgumentException('$cloneArguments parameter is not supported');
}
if ($callOriginalMethods) {
throw new CakeException('$callOriginalMethods parameter is not supported');
throw new InvalidArgumentException('$callOriginalMethods parameter is not supported');
}
if ($proxyTarget !== null) {
throw new CakeException('$proxyTarget parameter is not supported');
throw new InvalidArgumentException('$proxyTarget parameter is not supported');
}
return $MockBuilder->getMock();
}
Expand Down

0 comments on commit 7ba52d0

Please sign in to comment.