You are here

public function PMTeamTestCase::testpmteamCreate in Drupal PM (Project Management) 7

Same name and namespace in other branches
  1. 8 pmteam/pmteam.test \PMTeamTestCase::testpmteamCreate()
  2. 7.3 pmteam/pmteam.test \PMTeamTestCase::testpmteamCreate()
  3. 7.2 pmteam/pmteam.test \PMTeamTestCase::testpmteamCreate()

Tests creation of pmteam nodes.

File

pmteam/pmteam.test, line 33
Test definitions for the PM Team module.

Class

PMTeamTestCase
Class defining PM Team test cases.

Code

public function testpmteamCreate() {

  // Create and login user
  $user = $this
    ->drupalCreateUser(array(
    'Project Management Team: add',
    'Project Management Team: view all',
    'Project Management Person: add',
    'Project Management Person: view all',
  ));
  $this
    ->drupalLogin($user);

  // Create a team
  $team = array(
    'title' => $this
      ->randomName(32),
  );
  $this
    ->drupalPost('node/add/pmteam', $team, t('Save'));
  $this
    ->assertText(t('Team @title has been created.', array(
    '@title' => $team['title'],
  )));
}