You are here

protected function BreadcrumbIntegrationTest::editFacetConfig in Facets 8

Edit the facet configuration with the given values.

Parameters

array $config: The new configuration for the facet.

2 calls to BreadcrumbIntegrationTest::editFacetConfig()
BreadcrumbIntegrationTest::testBreadcrumbLabel in tests/src/Functional/BreadcrumbIntegrationTest.php
Tests enabling + disabling the breadcrumb label prefix.
BreadcrumbIntegrationTest::testGroupingIntegration in tests/src/Functional/BreadcrumbIntegrationTest.php
Tests Breadcrumb integration with grouping.

File

tests/src/Functional/BreadcrumbIntegrationTest.php, line 122

Class

BreadcrumbIntegrationTest
Tests the overall functionality of the Facets admin UI.

Namespace

Drupal\Tests\facets\Functional

Code

protected function editFacetConfig(array $config = []) {
  $this
    ->drupalGet('admin/config/search/facets');
  $this
    ->clickLink('Configure', 1);
  $default_config = [
    'filter_key' => 'f',
    'url_processor' => 'query_string',
    'breadcrumb[active]' => TRUE,
    'breadcrumb[group]' => TRUE,
  ];
  $edit = array_merge($default_config, $config);
  $this
    ->drupalPostForm(NULL, $edit, 'Save');
}