You are here

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

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

Tests creation of pmteam nodes.

File

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

Class

PMTeamTestCase
Define a test case for PM Team.

Code

public function testpmteamCreate() {

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

  // Create test content.
  $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'],
  )));
}