You are here

public function CommerceProductUIAdminTest::testCommerceProductUIProductTypeDisplayFields in Commerce Core 7

Access to the display fields admin screen.

File

modules/product/tests/commerce_product_ui.test, line 557
Functional tests for the commerce product ui module.

Class

CommerceProductUIAdminTest
Test the product and product type CRUD.

Code

public function testCommerceProductUIProductTypeDisplayFields() {

  // Login with normal user.
  $this
    ->drupalLogin($this->store_customer);

  // Access to the product type display fields screen.
  $this
    ->drupalGet('admin/commerce/products/types/product/display');
  $this
    ->assertResponse(403, t('Normal user is not able to access the product type display fields screen'));

  // Login with store admin.
  $this
    ->drupalLogin($this->store_admin);

  // Access to the product type display fields screen.
  $this
    ->drupalGet('admin/commerce/products/types/product/display');
  $this
    ->assertResponse(200, t('Store admin user can access the product type display fields screen'));
}