-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Csp] Covering the model classes by Unit Tests #26558
[Csp] Covering the model classes by Unit Tests #26558
Conversation
Hi @eduard13. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Hi @dmytro-ch, thank you for the review.
|
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.
Annotations are discouraged in PHPUnit and finally in version 9 are removed.
use RuntimeException; | ||
|
||
/** | ||
* Class ConfigManagerTest |
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.
This annotation is not necessary.
* @expectedExceptionMessage CSP can only be configured for storefront or admin area | ||
* @expectedException RuntimeException |
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.
Use $this->expectException
and $this->expectExceptionMessage
instead.
Annotations are going to be deprecated in further versions of PHPUnit and finally removed in PHPUnit 9.
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.
Hi @lbajsarowicz, that's makes sense.
Thanks.
*/ | ||
class PolicyRendererPoolTest extends TestCase | ||
{ | ||
private const STUB_POLICY_ID = 'header'; |
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.
👍
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.
Great job!
Hi @lbajsarowicz, thank you for the review.
|
✔️ QA Passed |
Hi @eduard13, thank you for your contribution! |
Description (*)
This PR covers the following model classes by Unit Tests:
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
N/A
Questions or comments
Contribution checklist (*)