Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PromotionOfferTest is now huge and tests all offers at once, which is not sustainable.
Let's give each offer its own test.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2981647_split_promotion_offer_test_2.patch | 30.45 KB | mitrpaka |
|
Comments
Comment #2
mitrpaka CreditAttribution: mitrpaka as a volunteer commentedComment #3
Nils LoewenApplied patch and tested on Local. All tests pass!
Comment #4
bojanz CreditAttribution: bojanz at Centarro commented1) We already have a namespace for offer tests: Drupal\Tests\commerce_promotion\Kernel\Plugin\Commerce\PromotionOffer
That's where the new tests need to go. They also don't need a Promotion prefix.
2) We also need to add @coversDefaultClass and @covers annotations.
3) The offerManager is added but never used.
4) Variation/product creation can happen in setUp().
Rerolling.
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedAddressed #4 and committed the result. Thanks.