You are here

public function PMExpenseTestCase::testpmExpenseAccess in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmexpense/pmexpense.test \PMExpenseTestCase::testpmExpenseAccess()
  2. 7.2 pmexpense/pmexpense.test \PMExpenseTestCase::testpmExpenseAccess()

Test of access controls on Expense lists.

File

pmexpense/pmexpense.test, line 33
Test definitions for PM Expense.

Class

PMExpenseTestCase
Define a test case for PM Expense.

Code

public function testpmExpenseAccess() {

  // Create user with permission to access Expense list.
  $user_access = $this
    ->drupalCreateUser(array(
    'Project Management expense: access',
  ));
  $this
    ->drupalLogin($user_access);

  // Test access to the Expense list.
  $this
    ->drupalGet('pm/expenses');
  $this
    ->assertText('Expenses', t('Make sure the correct page has been displayed by checking that the title is "Expenses".'));
}