-
-
Notifications
You must be signed in to change notification settings - Fork 74
quality-debt: tests/WP_Ultimo/Gateways/PayPal_REST_Gateway_Test.php — PR #636 review feedback (medium) #710
Copy link
Copy link
Closed
Labels
priority:mediumMedium severity — moderate quality issueMedium severity — moderate quality issuequality-debtUnactioned review feedback from merged PRsUnactioned review feedback from merged PRssource:review-feedbackAuto-created by quality-feedback-helper.shAuto-created by quality-feedback-helper.shstatus:in-progressWork is in progressWork is in progress
Description
Unactioned Review Feedback
Source PR: #636
File: tests/WP_Ultimo/Gateways/PayPal_REST_Gateway_Test.php
Reviewers: coderabbit
Findings: 1
Max severity: medium
MEDIUM: coderabbit (coderabbitai[bot])
File: tests/WP_Ultimo/Gateways/PayPal_REST_Gateway_Test.php:756
Test intent/expectation mismatch in title assertion.
Line 751 says this verifies title inclusion, but Line 755 only checks 'PayPal', so it passes even if the custom title is ignored.
💡 Proposed fix
public function test_get_checkout_label_html_includes_title(): void {
$html = $this->gateway->get_checkout_label_html('Custom Title');
- $this->assertStringContainsString('PayPal', $html); // Always shows PayPal
+ $this->assertStringContainsString('Custom Title', $html);
+ $this->assertStringContainsString('PayPal', $html);
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/WP_Ultimo/Gateways/PayPal_REST_Gateway_Test.php` around lines 751 -
756, The test test_get_checkout_label_html_includes_title currently calls
get_checkout_label_html('Custom Title') but only asserts that 'PayPal' appears,
so it doesn't verify the custom title; update the assertion(s) in this test to
check that the returned HTML contains the provided custom title (e.g.,
assertStringContainsString('Custom Title', $html)) and optionally keep the
existing assertStringContainsString('PayPal', $html) to ensure both the brand
and the custom title are present; if you prefer, also rename the test to reflect
both expectations.
View comment
Auto-generated by quality-feedback-helper.sh scan-merged. Review each finding and either fix the code or dismiss with a reason.
aidevops.sh v3.5.465 with claude-opus-4-6 spent 4d and 266 tokens on this as a headless worker.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority:mediumMedium severity — moderate quality issueMedium severity — moderate quality issuequality-debtUnactioned review feedback from merged PRsUnactioned review feedback from merged PRssource:review-feedbackAuto-created by quality-feedback-helper.shAuto-created by quality-feedback-helper.shstatus:in-progressWork is in progressWork is in progress