function MerciTestCase::merciCreateNode in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2
Same name and namespace in other branches
- 6.2 tests/merci_testcase.php \MerciTestCase::merciCreateNode()
15 calls to MerciTestCase::merciCreateNode()
- MerciBucketTestCase::testMerciTooManyBuckets in tests/
merci_bucket.test - MerciBucketTestCase::testMerciTooManyPlusConflictBuckets in tests/
merci_bucket.test - MerciIssueTestCase::testIssue1070658 in tests/
merci_issues.test - MerciIssueTestCase::testIssue1070662 in tests/
merci_issues.test - MerciIssueTestCase::testIssue1103328 in tests/
merci_issues.test
File
- tests/
merci_testcase.php, line 114 - Simpletest case for node_example module.
Class
- MerciTestCase
- Functionality tests for merci module. General setup and functions all merci tests should inherit.
Code
function merciCreateNode($type, $settings, $pass = TRUE) {
$this
->verbose('Creating node: ' . var_export($settings, TRUE));
$this
->drupalPost('node/add/' . $type, $settings, t('Save'));
if (array_key_exists('title', $settings)) {
$node = entity_load('node', FALSE, array(
'title' => $settings['title'],
));
//$this->verbose('Node created: ' . var_export($node, TRUE));
return array_shift($node);
}
}