class PMTeamTestCase in Drupal PM (Project Management) 8
Same name and namespace in other branches
- 7.3 pmteam/pmteam.test \PMTeamTestCase
- 7 pmteam/pmteam.test \PMTeamTestCase
- 7.2 pmteam/pmteam.test \PMTeamTestCase
Define a test case for PM Team.
Hierarchy
- class \PMTeamTestCase extends \DrupalWebTestCase
Expanded class hierarchy of PMTeamTestCase
File
- pmteam/
pmteam.test, line 10 - Test definitions for PM Team.
View source
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', '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'],
)));
}
/**
* Tests module uninstall path.
*/
public function testpmteamUninstall() {
$module = array(
'pmteam',
);
module_disable($module);
$result = drupal_uninstall_modules($module);
$this
->AssertTrue($result, t('Module successfully uninstalled.'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PMTeamTestCase:: |
public static | function | Defines meta data for PM Team test cases. | |
PMTeamTestCase:: |
public | function | Sets up all Project Management test cases. | |
PMTeamTestCase:: |
public | function | Tests creation of pmteam nodes. | |
PMTeamTestCase:: |
public | function | Tests module uninstall path. |