public function MerciSandboxTestCase::testTestTest in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3
Sandbox for test development
File
- merci_core/
tests/ merci_base.test, line 710 - Defines abstract base test class for the Merci module tests.
Class
- MerciSandboxTestCase
- Sandbox for trying new things with tests. Eases development so only one test has to run at a time. Move everything to MerciBaseTesterTestCase after it is functioning here.
Code
public function testTestTest() {
$operator_user = $this
->createMerciOperator(array(
'access checkout',
));
$this
->drupalLogin($operator_user);
$sku = 'PROD-01';
$product_name = 'Product One';
$product = $this
->createDummyProduct($sku, $product_name);
$line_item = $this
->createDummyLineItem($operator_user->uid, array(
$product->product_id => 1,
));
$this
->drupalGet("merci_line_item/{$line_item->line_item_id}/edit");
$this
->assertFieldById('edit-merci-resource-reference-und-0-target-id', $product_name . ' (' . $product->product_id . ')', t('When editing the product in the administration interface, the SKU is informed correctly'));
}