You are here

public function CommerceCheckoutTestProcess::assertCheckoutPageNotAccessible in Commerce Core 7

1 call to CommerceCheckoutTestProcess::assertCheckoutPageNotAccessible()
CommerceCheckoutTestProcess::testCommerceCheckoutAccessPages in modules/checkout/tests/commerce_checkout.test
Test order completion page access.

File

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

Class

CommerceCheckoutTestProcess
Test checkout process.

Code

public function assertCheckoutPageNotAccessible($order, $page) {
  $path = $this
    ->getCommerceUrl('checkout') . '/' . $order->order_id . ($page ? '/' . $page : '');
  $this
    ->drupalGet($path);
  return $this
    ->assertNotEqual($this
    ->getUrl(), url($path, array(
    'absolute' => TRUE,
  )), t('@page checkout page is not accessible.', array(
    '@page' => $page,
  )));
}