function ContentCrudTestCase::acquireContentTypes in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 6.3 tests/content.crud.test \ContentCrudTestCase::acquireContentTypes()
- 6.2 tests/content.crud.test \ContentCrudTestCase::acquireContentTypes()
Creates a number of content types with predictable names (simpletest_t1 ... simpletest_tN) These content types can later be accessed via $this->content_types[0 ... N-1]
Parameters
$count Number of content types to create:
2 calls to ContentCrudTestCase::acquireContentTypes()
File
- tests/
content.crud.test, line 235
Class
- ContentCrudTestCase
- Base class for CCK CRUD tests. Defines many helper functions useful for writing CCK CRUD tests.
Code
function acquireContentTypes($count) {
$this->content_types = array();
for ($i = 0; $i < $count; $i++) {
$name = 'simpletest_t' . ($i + 1);
$this->content_types[$i] = $this
->drupalCreateContentType(array(
'name' => $name,
'type' => $name,
));
}
content_clear_type_cache();
}