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

SecurityControllerTest.php の namespace の修正 #5676

Conversation

kazuyoshikakihara
Copy link
Contributor

概要(Overview・Refs Issue)

namespace が
Eccube\Tests\Web\Admin\Setting\Shop
になっていたので、趣旨およびファイル位置に沿った
Eccube\Tests\Web\Admin\Setting\System
に修正しました。

方針(Policy)

実装に関する補足(Appendix)

テスト(Test)

相談(Discussion)

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更はありません
  • フックポイントの呼び出しタイミングの変更はありません
  • フックポイントのパラメータの削除・データ型の変更はありません
  • twigファイルに渡しているパラメータの削除・データ型の変更はありません
  • Serviceクラスの公開関数の、引数の削除・データ型の変更はありません
  • 入出力ファイル(CSVなど)のフォーマット変更はありません

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか
    • 権限を超えた操作が可能にならないか
    • 不要なファイルアップロードがないか
    • 外部へ公開されるファイルや機能の追加ではないか
    • テンプレートでのエスケープ漏れがないか

@kazuyoshikakihara
Copy link
Contributor Author

テストエラーの原因について。

tests/Eccube/Tests/Web/Admin/Order/OrderPdfControllerTest.php
の300行目あたりに

        /**
         * @var Generator
         */
        $faker = $this->getFaker();
        $adminTest = $this->createMember();

というコードがあり、ここで$adminTestを生成していますが、Fakerで生成された$adminTestのユーザー名がたまたま既存のユーザー名と一致していた場合にテストが今回の位置でエラーとなります(手元で再現確認済)。

同様にユニークな値の生成に失敗した場合にテストが失敗する箇所が他にもありますので、この問題については別途 #5679 で修正用のプルリクエストを作成してあります。

@codecov-commenter
Copy link

Codecov Report

Merging #5676 (0070b4d) into 4.2 (16561c7) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                4.2    #5676   +/-   ##
=========================================
  Coverage     78.82%   78.83%           
  Complexity     6260     6260           
=========================================
  Files           469      469           
  Lines         21010    21009    -1     
=========================================
+ Hits          16561    16562    +1     
+ Misses         4449     4447    -2     
Flag Coverage Δ
E2E 64.77% <ø> (+<0.01%) ⬆️
Unit 77.53% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...be/Service/PurchaseFlow/Processor/TaxProcessor.php 84.21% <0.00%> (+1.75%) ⬆️
.../Service/PurchaseFlow/Processor/PointProcessor.php 95.83% <0.00%> (+1.95%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@chihiro-adachi chihiro-adachi added this to the 4.2.0 milestone Aug 28, 2022
@chihiro-adachi chihiro-adachi merged commit 457d8f9 into EC-CUBE:4.2 Aug 29, 2022
@chihiro-adachi
Copy link
Contributor

@kazuyoshikakihara
ありがとうございます。修正問題ないかと思います。

@chihiro-adachi chihiro-adachi added bugbounty2022:pr:entry バグバウンティ2022 バグ登録 PR登録 bugbounty2022:pr:recognition バグバウンティ2022 バグ登録 PR取込 labels Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugbounty2022:pr:entry バグバウンティ2022 バグ登録 PR登録 bugbounty2022:pr:recognition バグバウンティ2022 バグ登録 PR取込
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants