You are here

public function PMProjectTestCase::testpmprojectCreate in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 pmproject/pmproject.test \PMProjectTestCase::testpmprojectCreate()
  2. 7 pmproject/pmproject.test \PMProjectTestCase::testpmprojectCreate()
  3. 7.2 pmproject/pmproject.test \PMProjectTestCase::testpmprojectCreate()

Test case covering creation of pmprojects.

File

pmproject/pmproject.test, line 54
Test definitions for PM Project.

Class

PMProjectTestCase
Define a test case for PM Project.

Code

public function testpmprojectCreate() {

  // Log in with permission to create test content.
  $user = $this
    ->drupalCreateUser(array(
    'create pmproject content',
  ));
  $this
    ->drupalLogin($user);

  // Create test content.
  $prj = array(
    'title' => $this
      ->randomName(32),
  );
  $this
    ->drupalPost('node/add/pmproject', $prj, t('Save'));
  $this
    ->assertText(t('Project @title has been created.', array(
    '@title' => $prj['title'],
  )));
}