You are here

public function FacetapiAdminInterfaceTestCase::testRealmSettingsForms in Facet API 6.3

File

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

Class

FacetapiAdminInterfaceTestCase

Code

public function testRealmSettingsForms() {
  $this
    ->drupalLogin($this->adminUser);

  // Looks for placeholder text in main settings form.
  $this
    ->drupalGet('admin/settings/facetapi_test');
  $this
    ->assertRaw(FACETAPI_TEST_FORM_TEXT, t('Facet API test setting form exists.'));

  // Searches for "block" link in description.
  $description = t('The <em>Blocks</em> realm displays each facet in a separate <a href="@block-page">block</a>. Users are able to refine their searches in a drill-down fashion.', array(
    '@block-page' => url('admin/build/block', array(
      'query' => array(
        'destination' => 'admin/settings/facetapi_test/facets/block',
      ),
    )),
  ));
  $this
    ->drupalGet('admin/settings/facetapi_test/facets/block');
  $this
    ->assertRaw($description, t('Facet API test facet form exists.'));
}