You are here

public function PMTaskTestCase::testpmtaskCreate in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmtask/pmtask.test \PMTaskTestCase::testpmtaskCreate()
  2. 7 pmtask/pmtask.test \PMTaskTestCase::testpmtaskCreate()
  3. 7.2 pmtask/pmtask.test \PMTaskTestCase::testpmtaskCreate()

Test of Task node creation.

File

pmtask/pmtask.test, line 55
Test definitions for PM Task.

Class

PMTaskTestCase
Define a test case for PM Task.

Code

public function testpmtaskCreate() {

  // Log in with permission to create test content.
  $user = $this
    ->drupalCreateUser(array(
    'create pmtask content',
  ));
  $this
    ->drupalLogin($user);

  // Create test content.
  $task = array(
    'title' => $this
      ->randomName(32),
  );
  $this
    ->drupalPost('node/add/pmtask', $task, t('Save'));
  $this
    ->assertText(t('Task @title has been created.', array(
    '@title' => $task['title'],
  )));
}