public function PMTaskTestCase::testpmtaskCreate in Drupal PM (Project Management) 7.2
Same name and namespace in other branches
- 8 pmtask/pmtask.test \PMTaskTestCase::testpmtaskCreate()
- 7.3 pmtask/pmtask.test \PMTaskTestCase::testpmtaskCreate()
- 7 pmtask/pmtask.test \PMTaskTestCase::testpmtaskCreate()
Test of Task node creation.
File
- pmtask/
pmtask.test, line 54 - 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 pmorganization content',
'create pmproject content',
'create pmtask content',
));
$this
->drupalLogin($user);
// Create test content.
$org = array(
'title' => $this
->randomName(32),
);
$prj = array(
'title' => $this
->randomName(32),
);
$task = array(
'title' => $this
->randomName(32),
);
$this
->drupalPost('node/add/pmorganization', $org, t('Save'));
$this
->drupalPost('node/add/pmproject', $prj, t('Save'));
$this
->drupalPost('node/add/pmtask', $task, t('Save'));
$this
->assertText(t('Task @title has been created.', array(
'@title' => $task['title'],
)));
}