1 dblog.test | private DBLogTestCase::getContent($type) |
Creates random content based on node content type.
Parameters
string $type: Node content type (e.g., 'post').
Return value
array: Random content needed by various node types.
File
- core/
modules/ dblog/ tests/ dblog.test, line 410 - Tests for dblog.module.
Class
- DBLogTestCase
- Tests logging messages to the database.
Code
private function getContent($type) {
$langcode = LANGUAGE_NONE;
switch ($type) {
case 'book':
$content = array(
"title" => $this->randomName(8),
"body[$langcode][0][value]" => $this->randomName(32),
);
break;
default:
$content = array(
"title" => $this->randomName(8),
"body[$langcode][0][value]" => $this->randomName(32),
);
break;
}
return $content;
}