Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions TestSuite/NetCommonsControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,21 @@ protected function _testActionOnValidationError($method, $data, $urlOptions, $va
return $result;
}

/**
* ExceptionErrorのMockセット
*
* @param string $mockModel Mockのモデル
* @param string $mockMethod Mockのメソッド
* @return void
*/
protected function _mockForReturnFalse($mockModel, $mockMethod) {
list($mockPlugin, $mockModel) = pluginSplit($mockModel);
$Mock = $this->getMockForModel($mockPlugin . '.' . $mockModel, array($mockMethod));
$Mock->expects($this->once())
->method($mockMethod)
->will($this->returnValue(false));
}

/**
* Generates a mocked controller and mocks any classes passed to `$mocks`. By
* default, `_stop()` is stubbed as is sending the response headers, so to not
Expand Down