You are here

public function CommerceCheckoutTestProcess::testCommerceCheckoutAccessOrder in Commerce Core 7

Test order completion page access.

File

modules/checkout/tests/commerce_checkout.test, line 445
Functional tests for the commerce checkout module.

Class

CommerceCheckoutTestProcess
Test checkout process.

Code

public function testCommerceCheckoutAccessOrder() {

  // Log in as normal user.
  $this
    ->drupalLogin($this->store_customer);

  // Create dummy product.
  $product = $this
    ->createDummyProduct('PROD-01', 'Product One');

  // Order creation, in complete status.
  $this->order = $this
    ->createDummyOrder($this->store_customer->uid, array(
    $product->product_id => 1,
  ), 'complete');

  // Access to the complete page, this one should be always accesible.
  $this
    ->assertCheckoutPageAccessible($this->order, 'complete');
}