PromotionOfferTest is now huge and tests all offers at once, which is not sustainable.

Let's give each offer its own test.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

mitrpaka’s picture

Status: Active » Needs review
FileSize
30.45 KB
Nils Loewen’s picture

Status: Needs review » Reviewed & tested by the community

Applied patch and tested on Local. All tests pass!

bojanz’s picture

Assigned: Unassigned » bojanz
Status: Reviewed & tested by the community » Needs work

1) 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.

  • bojanz committed 728f31c on 8.x-2.x
    Issue #2981647 by mitrpaka, bojanz: Split PromotionOfferTest into...
bojanz’s picture

Assigned: bojanz » Unassigned
Status: Needs work » Fixed

Addressed #4 and committed the result. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.