function MerciTestCase::merciCreateItem in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2
Same name and namespace in other branches
- 7.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 - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- MerciIssueTestCase::setUp in tests/
merci_issues.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- MerciResourceTestCase::setUp in tests/
merci_resource.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- MerciUserTestCase::setUp in tests/
merci_user.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
File
- tests/
merci_testcase.php, line 128 - 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;
}