public function CommerceProductUIAdminTest::testCommerceProductUIProductTypeManageFields in Commerce Core 7
Access to the manage fields admin screen.
File
- modules/
product/ tests/ commerce_product_ui.test, line 536 - Functional tests for the commerce product ui module.
Class
- CommerceProductUIAdminTest
- Test the product and product type CRUD.
Code
public function testCommerceProductUIProductTypeManageFields() {
// Login with normal user.
$this
->drupalLogin($this->store_customer);
// Access to the product type manage fields screen.
$this
->drupalGet('admin/commerce/products/types/product/fields');
$this
->assertResponse(403, t('Normal user is not able to access the product type manage fields screen'));
// Login with store admin.
$this
->drupalLogin($this->store_admin);
// Access to the product type manage fields screen.
$this
->drupalGet('admin/commerce/products/types/product/fields');
$this
->assertResponse(200, t('Store admin user can access the product type manage fields screen'));
}