t('Storm Ticket Functionality'), 'description' => t('Test the functionality of the Storm Ticket module'), 'group' => 'Storm', ); } public function setUp() { parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject', 'stormtask', 'stormticket'); } public function testStormticketCreate() { // Create and login user $user = $this->drupalCreateUser(array('Storm organization: add', 'Storm organization: view all', 'Storm project: add', 'Storm project: view all', 'Storm task: add', 'Storm task: view all', 'Storm ticket: add', 'Storm ticket: view all')); $this->drupalLogin($user); // Create organization and invoice $org = array( 'title' => $this->randomName(32), 'body' => $this->randomName(64), ); $prj = array( 'title' => $this->randomName(32), 'organization_nid' => '1', ); $task = array( 'title' => $this->randomName(32), 'body' => $this->randomName(64), ); $ticket = array( 'title' => $this->randomName(32), 'body' => $this->randomName(64), ); $this->drupalPost('node/add/stormorganization', $org, t('Save')); $this->drupalPost('node/add/stormproject', $prj, t('Save')); $this->drupalPost('node/add/stormtask', $task, t('Save')); $this->drupalPost('node/add/stormticket', $ticket, t('Save')); $this->assertText(t('Ticket @title has been created.', array('@title' => $ticket['title'])));; } }