function CommerceBackofficeProductTestCase::testProductDisplay in Commerce Backoffice 7
Create, display a product display var the user interface.
File
- ./
commerce_backoffice_product.test, line 96
Class
- CommerceBackofficeProductTestCase
- Tests the commerce backoffice product interface.
Code
function testProductDisplay() {
// Create a product display.
drupal_static_reset('checkPermissions');
$admin_user = $this
->drupalCreateUser(array(
'create ' . $this->variationType['type'] . ' content',
'create commerce_product entities of bundle ' . $this->variationType['type'],
));
$this
->drupalLogin($admin_user);
$productDisplay = $this
->createProductDisplay($this->variationType['type']);
// visit the product display.
$this
->drupalGet('node/' . $productDisplay->nid);
$this
->assertResponse(200);
}