-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BcUploaderを全体テストの実行対象に追加する #2838
BcUploaderを全体テストの実行対象に追加する #2838
Conversation
# Conflicts: # phpunit.xml.dist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HungDV2022 レビューいれました。確認お願いします。
@@ -358,11 +358,6 @@ public function test_upload() | |||
//テストファイルとフォルダを削除 | |||
rmdir($filePath); | |||
unlink($fullpath . 'uploadTestFile.html'); | |||
|
|||
//エラーを発生した場合 | |||
$this->post('/baser/admin/bc-theme-file/theme_files/index/BcThemeSample/layout3'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HungDV2022 削除した理由はなんでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryuring
こちらと同じ理由です。#2844 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解しました。
@@ -277,30 +279,16 @@ public function test_update() | |||
//正常系実行 | |||
$entity = $this->UploaderFilesService->update($entity, $postData); | |||
$this->assertEquals('test.jpg', $entity->name); | |||
//異常系実行 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HungDV2022 削除した理由はなんですか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryuring 同じメソッドで正常系テスト異常系テストが実装できないので別メソッドを書きました。確認お願いします
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryuring
Git環境だとisEditableメソッドをテストした時いつもTrueを変えしますので異常系をテストできないです。一旦コメントアウトしました。
確認お願いします。
@@ -316,7 +304,7 @@ public function test_isEditable() | |||
'user_id' => 99 | |||
]; | |||
$result = $this->UploaderFilesService->isEditable($postData); | |||
$this->assertFalse($result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HungDV2022 仕様が変わってしまっています。理由はなんですか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryuring https://github.com/baserproject/basercms/pull/2838/files/efba8b5317f3410f13d2ea06da78f2f74e51c578#r1385795775
こちらと同じ理由でメソッドを分けてテスト方がいいだと思います。同じメソッドを書くと期待値が変わります。
No description provided.