GH#712: test(gateway): write unit tests for Base_Gateway#720
GH#712: test(gateway): write unit tests for Base_Gateway#720superdav42 merged 2 commits intomainfrom
Conversation
- Test constructor/init with and without order - Test set_order, get_id, get_all_ids - Test payment method display and change URL defaults - Test support flags (recurring, free trials, amount update, payment polling) - Test verify_and_complete_payment default response - Test get_public_title with registration and fallback - Test URL generation (return, cancel, confirm, webhook listener) - Test setters (payment, membership, customer) - Test trigger_payment_processed action - Test swap save/retrieve - Test backwards compatibility v1 ID - Test amount update messages - Test process_membership_update with no changes, amount change, duration change - Test gateway URL methods (payment, subscription, customer) - Test optional method defaults - Coverage increased from 0% to 10.34% methods, 8.20% lines Covers: constructor/init, process_checkout, process_refund, get_public_key, handle_webhook, get_checkout_fields, validate_fields, add_payment_gateway_hooks
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 20 minutes and 45 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for 81cde4e are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
✅ Ready for Review & MergeAll CI checks have passed successfully:
Test Coverage Summary
Implementation Highlights
This PR is ready to merge. CodeRabbit hit a rate limit but all automated checks passed. |
Summary
Base_Gatewayclass (inc/gateways/class-base-gateway.php)tests/WP_Ultimo/Gateways/Base_Gateway_Test.phpTest Coverage
Constructor & Initialization
Gateway Identity
Payment Method Display
Support Flags
Public Title
URL Generation
Setters
Actions & Hooks
Swap Management
Amount Update Messages
Membership Updates
Gateway URLs
Optional Methods
Implementation Notes
Test_Gatewayclass to test abstractBase_Gateway_originalproperty for membership update testsManual_Gateway_TestandFree_Gateway_TestAcceptance Criteria
tests/WP_Ultimo/Gateways/Base_Gateway_Test.phpCloses #712