You are here

private function PatternsGeneralTestCase::verifyAccess in Patterns 7

Same name and namespace in other branches
  1. 7.2 tests/general/general.test \PatternsGeneralTestCase::verifyAccess()

Verify the logged in user has the desired access to the various menu nodes.

Parameters

integer $response HTTP response code.:

1 call to PatternsGeneralTestCase::verifyAccess()
PatternsGeneralTestCase::testPatterns in tests/general/general.test
Login users, load the Patterns list page.

File

tests/general/general.test, line 67
General SimpleTests for Patterns. Also, a Pattern running base class which uses QuickRun.

Class

PatternsGeneralTestCase
@file General SimpleTests for Patterns. Also, a Pattern running base class which uses QuickRun.

Code

private function verifyAccess($response = 200) {

  // View patterns list.
  $this
    ->drupalGet('admin/patterns');
  $this
    ->assertResponse($response);
  if ($response == 200) {
    $this
      ->checkPage();

    //$this->assertTitle('Patterns | Drupal');
    $this
      ->assertUniqueText(t('Commands'), t('Patterns commands loaded'));
    $this
      ->assertUniqueText(t('No patterns available.'), t('No patterns found (correctly!)'));
    $this
      ->assertUniqueText(t('Removed Patterns'), t('Patterns trash bin loaded'));
  }
}