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