public function PMTimetrackingTestCase::testpmtimetrackingCreate in Drupal PM (Project Management) 7.3
Same name and namespace in other branches
- 8 pmtimetracking/pmtimetracking.test \PMTimetrackingTestCase::testpmtimetrackingCreate()
- 7 pmtimetracking/pmtimetracking.test \PMTimetrackingTestCase::testpmtimetrackingCreate()
- 7.2 pmtimetracking/pmtimetracking.test \PMTimetrackingTestCase::testpmtimetrackingCreate()
Test case covering creation of pmtimetrackings.
File
- pmtimetracking/
pmtimetracking.test, line 33 - Test definitions for PM Timetracking.
Class
- PMTimetrackingTestCase
- Define a test case for PM Timetracking.
Code
public function testpmtimetrackingCreate() {
// Log in with permission to create test content.
$user = $this
->drupalCreateUser(array(
'create pmtimetracking content',
));
$this
->drupalLogin($user);
// Create test content.
$timetracking = array(
'title' => $this
->randomName(32),
);
$this
->drupalPost('node/add/pmtimetracking', $timetracking, t('Save'));
$this
->assertText(t('Timetracking @title has been created.', array(
'@title' => $timetracking['title'],
)));
}