if ($testSwitchToDefault) { $activeShippingMethod =
$crawler->
filterXPath('//div[contains(concat(" ",normalize-space(@class)," "), " shipping-method-radio ")][input/@checked]'
)->
text();
static::
assertStringContainsString('Standard',
$activeShippingMethod);
$activePaymentMethod =
$crawler->
filterXPath('//div[contains(concat(" ",normalize-space(@class)," "), " payment-method-radio ")][input/@checked]'
)->
text();
static::
assertStringContainsString('Paid in advance',
$activePaymentMethod);
} // Ensure submit order button is disabled
if (!
$stockError) { $submitButton =
$crawler->
filterXPath('//button[@id="confirmFormSubmit"][@disabled]'
);
static::
assertCount(($orderShouldBeBlocked ||
$errors->
blockOrder()) ? 1 : 0,
$submitButton);
} } /**
* @return array<array<mixed>>
*/
public static function errorDataProvider(): array
{ return [ // One shipping method blocked is expected to be switched
[