function ContentCrudTestCase::acquireNodes in Content Construction Kit (CCK) 6.2
Same name and namespace in other branches
- 6.3 tests/content.crud.test \ContentCrudTestCase::acquireNodes()
- 6 tests/content.crud.test \ContentCrudTestCase::acquireNodes()
Creates a number of nodes of each acquired content type. Remember to call acquireContentTypes() before calling this, else the content types won't exist.
Parameters
$count Number of nodes to create per acquired content type (defaults to 1):
2 calls to ContentCrudTestCase::acquireNodes()
- ContentCrudMultipleToSingleTest::setUp in tests/
content.crud.test - Enable CCK, Text, and Schema modules.
- ContentCrudSingleToMultipleTest::setUp in tests/
content.crud.test - Enable CCK, Text, and Schema modules.
File
- tests/
content.crud.test, line 269
Class
- ContentCrudTestCase
- Base class for CCK CRUD tests. Defines many helper functions useful for writing CCK CRUD tests.
Code
function acquireNodes($count = 1) {
$this->nodes = array();
foreach ($this->content_types as $content_type) {
for ($i = 0; $i < $count; $i++) {
$this->nodes[] = $this
->drupalCreateNode(array(
'type' => $content_type->type,
));
}
}
}