You are here

public function FacetapiAdminInterfaceTestCase::testFormAccess in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 tests/facetapi.test \FacetapiAdminInterfaceTestCase::testFormAccess()
  2. 7 tests/facetapi.test \FacetapiAdminInterfaceTestCase::testFormAccess()

File

tests/facetapi.test, line 179
Tests for the Facet API module.

Class

FacetapiAdminInterfaceTestCase

Code

public function testFormAccess() {
  $this
    ->drupalLogin($this->authenticatedUser);
  $this
    ->drupalGet('admin/settings/facetapi_test/facet');
  $this
    ->assertResponse(403, t('The "administer search" permission is required to access the realm settings form.'));

  // @todo Randomize facet / realm combination?
  $this
    ->drupalGet('admin/settings/facetapi/facetapi_test/block/enabled/edit');
  $this
    ->assertResponse(403, t('The "administer search" permission is required to access the facet settings form.'));
  $this
    ->drupalGet('admin/settings/facetapi/facetapi_test/block/enabled/dependencies');
  $this
    ->assertResponse(403, t('The "administer search" permission is required to access the facet dependencies form.'));
  $this
    ->drupalGet('admin/settings/facetapi/facetapi_test/block/enabled/export');
  $this
    ->assertResponse(403, t('The "administer search" permission is required to access the facet export form.'));
}