public function FacetapiSearchPageInterfaceTestCase::testFormAccess in Facet API 6.3
Same name and namespace in other branches
- 7.2 tests/facetapi.test \FacetapiSearchPageInterfaceTestCase::testFormAccess()
- 7 tests/facetapi.test \FacetapiSearchPageInterfaceTestCase::testFormAccess()
File
- tests/
facetapi.test, line 237 - Tests for the Facet API module.
Class
Code
public function testFormAccess() {
// @todo Implement API to enable facets.
// @see http://drupal.org/node/1208326
$this
->drupalLogin($this->adminUser);
$this
->enableFacet('enabled', t('Enabled facet'));
$this
->drupalLogin($this->authenticatedUser);
// @todo Randomize keys.
// Tests breadcrumb trail when search keys are in the path.
$path = 'facetapi_test/search/testkeys';
$options = array(
'query' => array(
'f' => array(
0 => 'enabled:testone',
),
),
);
$this
->drupalGet($path, $options);
$this
->clickLink('testkeys');
$this
->assertUrl($path);
// Tests breadcrumb trail when search keys are in the query string.
$path = 'facetapi_test/search';
$options = array(
'query' => array(
'keys' => 'testkeys',
'f' => array(
0 => 'enabled:testone',
),
),
);
$this
->drupalGet($path, $options);
$this
->clickLink('testkeys');
$this
->assertUrl($path, array(
'query' => array(
'keys' => 'testkeys',
),
));
}