private function DBLogTestCase::getContentUpdate

Creates random content as an update based on node content type.

Parameters

string $type: Node content type (e.g., 'article').

Return value

array Random content needed by various node types.

2 calls to DBLogTestCase::getContentUpdate()
DBLogTestCase::doNode in drupal-7.x/modules/dblog/dblog.test
Generates and then verifies some node events.
DBLogTestCase::doNode in drupal-7.x/modules/dblog/dblog.test
Generates and then verifies some node events.

Archivo

drupal-7.x/modules/dblog/dblog.test, line 391
Tests for dblog.module.

Class

DBLogTestCase
Tests logging messages to the database.

Código

private function getContentUpdate($type) {
  switch ($type) {
    case 'poll':
      $content = array(
        'choice[chid:1][chtext]' => $this->randomName(32),
        'choice[chid:2][chtext]' => $this->randomName(32),
      );
      break;

    default:
      $langcode = LANGUAGE_NONE;
      $content = array(
        "body[$langcode][0][value]" => $this->randomName(32),
      );
      break;
  }
  return $content;
}