function MerciTestCase::merciCreateItem in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2
Same name and namespace in other branches
- 6.2 tests/merci_testcase.php \MerciTestCase::merciCreateItem()
6 calls to MerciTestCase::merciCreateItem()
- MerciAdminTestCase::testMerciBucketContent in tests/
merci_admin.test - MerciBucketTestCase::setUp in tests/
merci_bucket.test - Sets up a Drupal site for running functional and integration tests.
- MerciIssueTestCase::setUp in tests/
merci_issues.test - Sets up a Drupal site for running functional and integration tests.
- MerciResourceTestCase::setUp in tests/
merci_resource.test - Sets up a Drupal site for running functional and integration tests.
- MerciUserTestCase::setUp in tests/
merci_user.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
merci_testcase.php, line 135 - Simpletest case for node_example module.
Class
- MerciTestCase
- Functionality tests for merci module. General setup and functions all merci tests should inherit.
Code
function merciCreateItem($merci_type, $type = NULL, $merci_settings = array()) {
$type = $type ? $type : $merci_type;
$settings = array(
'type' => $type,
);
$type = $this
->merciCreateContentType($settings, $merci_type, $merci_settings);
// Create resource item
$edit = array(
'title' => $this
->randomName(),
);
$item = $this
->merciCreateNode($type, $edit);
$this
->assertText(t("@title has been created", array(
'@title' => $edit['title'],
)));
return $item;
}