Skip to content

Commit

Permalink
Merge pull request #78 from s-nakajima/master
Browse files Browse the repository at this point in the history
CakePHP 2.10で、phpunit 4以降に対応
  • Loading branch information
s-nakajima committed Sep 11, 2017
2 parents 5cc7224 + d39af61 commit 2fd2e7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Test/Case/Controller/TaskContentsController/ViewTest.php
Expand Up @@ -391,9 +391,6 @@ private function __assertView($contentKey, $isLatest = false) {
* @return void
*/
public function testCommentPost() {
// ログイン
TestAuthGeneral::login($this, Role::ROOM_ROLE_KEY_GENERAL_USER);

// コメントPOST
$data = [
'TaskContent' => [
Expand All @@ -407,6 +404,9 @@ public function testCommentPost() {
]
]);

// ログイン
TestAuthGeneral::login($this, Role::ROOM_ROLE_KEY_GENERAL_USER);

// ContentCommentsComponent::comment()がコールされる
$this->controller->ContentComments->expects($this->once())
->method('comment')
Expand All @@ -432,9 +432,6 @@ public function testCommentPost() {
* @return void
*/
public function testCommentPostFail() {
// ログイン
TestAuthGeneral::login($this, Role::ROOM_ROLE_KEY_GENERAL_USER);

// コメントPOST
$data = [
'TaskContent' => [
Expand All @@ -448,6 +445,9 @@ public function testCommentPostFail() {
]
]);

// ログイン
TestAuthGeneral::login($this, Role::ROOM_ROLE_KEY_GENERAL_USER);

// ContentCommentsComponent::comment()がコールされる
$this->controller->ContentComments->expects($this->once())
->method('comment')
Expand Down
Expand Up @@ -194,7 +194,7 @@ public function testEditPostValidationError() {
'code' => 400,
'class' => 'danger',
'interval' => 4000,
'plugin' => 'NetCommons',
//'plugin' => 'NetCommons',
'ajax' => true,
'error' => '不正なリクエストの可能性があります。',
);
Expand Down
2 changes: 1 addition & 1 deletion Test/Case/Model/TaskContent/SaveContentTest.php
Expand Up @@ -165,7 +165,7 @@ public function testSetChargeFalse() {

$choicesMock = $this->getMockForModel('Tasks.' . 'TaskCharge', ['setCharges']);
$choicesMock->expects($this->any())
->method('setChargesAll')
->method('setCharges')
->will($this->returnValue(false));

//テスト実行
Expand Down

0 comments on commit 2fd2e7b

Please sign in to comment.