public function CheckoutAccessTest::testCanceledOrderCheckout in Commerce Core 8.2
Tests that canceled orders cannot enter checkout.
File
- modules/
checkout/ tests/ src/ Kernel/ CheckoutAccessTest.php, line 126
Class
- CheckoutAccessTest
- Tests the checkout access for orders.
Namespace
Drupal\Tests\commerce_checkout\KernelCode
public function testCanceledOrderCheckout() {
$user1 = $this
->createUser([], [
'access checkout',
]);
$order = $this
->createOrder($user1);
$order
->getState()
->applyTransitionById('cancel');
$request = $this
->createRequest($order);
$this
->assertFalse($this->accessManager
->checkRequest($request, $user1));
}