You are here

public function FacetapiAdminInterfaceTestCase::testDisplayFormRedirect in Facet API 7

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

Tests display form redirects.

File

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

Class

FacetapiAdminInterfaceTestCase
Test cases for operations taken through the admin UI.

Code

public function testDisplayFormRedirect() {
  list($facet, $realm, $adapter, $base_path) = $this
    ->facetapiLoadObjects();
  $path = "{$base_path}/edit";
  $button_text = t('Save and go back to realm settings');
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalPost($path, array(), $button_text);
  $this
    ->assertRaw($realm['label'], t('Form is redirected to realm settings form when the "@button-text" button is submitted.', array(
    '@button-text' => $button_text,
  )));
}