pmteam.test in Drupal PM (Project Management) 7.2
Same filename and directory in other branches
Test definitions for PM Team.
File
pmteam/pmteam.testView source
<?php
/**
 * @file
 * Test definitions for PM Team.
 */
/**
 * Define a test case for PM Team.
 */
class PMTeamTestCase extends DrupalWebTestCase {
  /**
   * Defines meta data for PM Team test cases.
   */
  public static function getInfo() {
    return array(
      'name' => t('PM Team Functionality'),
      'description' => t('Test the functionality of the PM Team module'),
      'group' => 'Project Management',
    );
  }
  /**
   * Sets up all Project Management test cases.
   */
  public function setUp() {
    parent::setUp('views', 'pm', 'pmorganization', 'pmteam');
  }
  /**
   * Tests creation of pmteam nodes.
   */
  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'],
    )));
  }
}Classes
| 
            Name | 
                  Description | 
|---|---|
| PMTeamTestCase | Define a test case for PM Team. |