You are here

public function SaveDraftTestCase::setUp in Save Draft 7

Same name and namespace in other branches
  1. 6.2 save_draft.test \SaveDraftTestCase::setUp()

Setup title, body and user.

Overrides DrupalWebTestCase::setUp

File

./save_draft.test, line 41
Link base test file - contains common functions for testing links.

Class

SaveDraftTestCase
@file Link base test file - contains common functions for testing links.

Code

public function setUp() {
  parent::setUp(array(
    'save_draft',
  ));
  $this->admin_user = $this
    ->drupalCreateUser(array(
    'administer nodes',
    'bypass node access',
  ));
  $this->save_draft_user = $this
    ->drupalCreateUser(array(
    'create article content',
    'edit any article content',
    'view own unpublished content',
    'save draft',
  ));
  $langcode = LANGUAGE_NONE;
  $this->title_key = "title";
  $this->body_key = "body[{$langcode}][0][value]";
  $this->button_unpublish = t('Unpublish');
  $this->button_publish = t('Publish');
  $this->button_save_draft = t('Save as draft');
  $this->button_save = t('Save');
  $this->button_preview = t('Preview');
  $this->button_delete = t('Delete');
}