Discovered in #3093383: Fix the tests on Drupal 8.8-beta1.

    // Confirm that the overridden_unit_price flag is preserved.
    $this->assertTrue($order_item->isUnitPriceOverridden());

The test is complaining that $order_item->isUnitPriceOverridden() is not a real boolean, which should be impossible. We need to investigate what's going on.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Title: OrderIntegrationTest::testTaxExemptPrices() is failing on Drupal 8.8 » Boolean getters must cast the value before returning it

This test is highlighting a real problem.

You set TRUE as the value, but as soon as you save it, it becomes "1". TypedData does not cast on load, it's up to us to do that. That means that every boolean getter in Commerce must do a (bool) cast.

bojanz’s picture

Some getters already had the cast. Some didn't. Now unified.

Checked contrib (Recurring, Shipping, Pricelist, Wishlist, etc) and they all seem to have casts.

  • bojanz committed 110cae1 on 8.x-2.x
    Issue #3093398 by bojanz: Boolean getters must cast the value before...
bojanz’s picture

Status: Needs review » Fixed

And with that, our build is green again on 8.8 and 8.9

Status: Fixed » Closed (fixed)

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