Fix casing issue with promo tests #3310
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on the test fixes I made, here's a PR description using the template:
Description
This PR fixes failing unit tests in
FeedUploadUtilsTest
that were expecting lowercase coupon codes but receiving uppercase values. The tests were creating coupons with uppercase titles (e.g., 'COUPON-CODE-1') but asserting against lowercase values in the expected results.Type of change
Checklist
Changelog entry
Fixed unit tests expecting lowercase coupon codes to match uppercase coupon titles
Test Plan
vendor/bin/phpunit tests/Unit/Feed/FeedUploadUtilsTest.php
test_get_coupons_data_valid_coupon_with_target_product
test_get_coupons_data_valid_shipping_coupon
test_get_coupons_data_coupon_with_included_excluded_products
test_get_coupons_data_coupon_with_included_excluded_categories
Screenshots
Before
Tests were failing with assertion errors showing mismatched coupon codes:
After
All tests pass successfully with the corrected uppercase expectations matching the actual coupon titles created in the tests.