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