You are here

public function PMOrganizationTestCase::testpmorganizationCreate in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmorganization/pmorganization.test \PMOrganizationTestCase::testpmorganizationCreate()
  2. 7 pmorganization/pmorganization.test \PMOrganizationTestCase::testpmorganizationCreate()
  3. 7.2 pmorganization/pmorganization.test \PMOrganizationTestCase::testpmorganizationCreate()

Test case ensuring that organization nodes can be created.

File

pmorganization/pmorganization.test, line 54
Test definitions for PM Organization.

Class

PMOrganizationTestCase
Define a test case for PM Organization.

Code

public function testpmorganizationCreate() {

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

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