You are here

public function FacetapiBugFixTestCase::testValidDefaults in Facet API 7

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

Tests bug fixed at http://drupal.org/node/1443340.

File

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

Class

FacetapiBugFixTestCase

Code

public function testValidDefaults() {
  list($facet, $realm, $adapter, $base_path) = $this
    ->facetapiLoadObjects('defaults');
  $this
    ->drupalLogin($this->adminUser);
  $path = "{$base_path}/edit";
  $values = array(
    'widget' => 'facetapi_nonterm',
  );
  $this
    ->drupalGet($path);
  $this
    ->drupalPost($path, $values, t('Save configuration'));
  $settings = $adapter
    ->getFacetSettingsGlobal($facet);
  $message = t('Defaults settings not hard coded to "term" and FACETAPI_OPERATOR_AND.');
  $this
    ->assertEqual($settings->settings['query_type'], 'nonterm', $message, 'Facet API');
  $this
    ->facetapiIssueMessage('http://drupal.org/node/1443340');
}