Skip to content
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

Merged
merged 25 commits into from
Nov 15, 2023

Conversation

HungDV2022
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@ryuring ryuring left a 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');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HungDV2022 削除した理由はなんでしょうか?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryuring
こちらと同じ理由です。#2844 (comment)

Copy link
Collaborator

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);
//異常系実行
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HungDV2022 削除した理由はなんですか?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryuring 同じメソッドで正常系テスト異常系テストが実装できないので別メソッドを書きました。確認お願いします

Copy link
Collaborator Author

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HungDV2022 仕様が変わってしまっています。理由はなんですか?

Copy link
Collaborator Author

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
こちらと同じ理由でメソッドを分けてテスト方がいいだと思います。同じメソッドを書くと期待値が変わります。

@ryuring ryuring added the Reviewed レビュー済 label Nov 7, 2023
@ryuring ryuring assigned HungDV2022 and unassigned ryuring Nov 7, 2023
@ryuring ryuring removed their assignment Nov 9, 2023
@HungDV2022 HungDV2022 assigned ryuring and unassigned HungDV2022 Nov 9, 2023
@ryuring ryuring merged commit 8c41b21 into baserproject:dev-5 Nov 15, 2023
1 check passed
@momofff momofff added this to the 5.0.7 milestone Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed レビュー済
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants