diff --git a/src/Tests/BlockTestTrait.php b/src/Tests/BlockTestTrait.php index 1dd33ae..af5b220 100644 --- a/src/Tests/BlockTestTrait.php +++ b/src/Tests/BlockTestTrait.php @@ -33,12 +33,12 @@ trait BlockTestTrait { $this->drupalGet($facet_add_page); - $facet_source = "views_page:{$source}__{$display_id}"; + $facet_source = "search_api:{$source}__{$display_id}"; $form_values = [ 'id' => $id, 'name' => $name, 'facet_source_id' => $facet_source, - "facet_source_configs[views_page:{$source}__{$display_id}][field_identifier]" => $field, + "facet_source_configs[search_api:{$source}__{$display_id}][field_identifier]" => $field, ]; $this->drupalPostForm(NULL, ['facet_source_id' => $facet_source], $this->t('Configure facet source')); $this->drupalPostForm(NULL, $form_values, $this->t('Save')); diff --git a/src/Tests/FacetSourceTest.php b/src/Tests/FacetSourceTest.php index 8591d34..91d058f 100644 --- a/src/Tests/FacetSourceTest.php +++ b/src/Tests/FacetSourceTest.php @@ -49,7 +49,7 @@ class FacetSourceTest extends WebTestBase { $this->assertResponse(200); $this->assertUrl('admin/config/search/facets'); - $this->assertText('Facet source views_page:search_api_test_view__block_1 has been saved.'); + $this->assertText('Facet source search_api:search_api_test_view__block_1 has been saved.'); $this->clickLink($this->t('Configure')); // Test that saving worked filter_key has the new value. @@ -72,7 +72,7 @@ class FacetSourceTest extends WebTestBase { $this->assertResponse(200); $this->assertUrl('admin/config/search/facets'); - $this->assertText('Facet source views_page:search_api_test_view__block_1 has been saved.'); + $this->assertText('Facet source search_api:search_api_test_view__block_1 has been saved.'); $this->clickLink($this->t('Configure')); // Test that saving worked and that the url processor has the new value. diff --git a/src/Tests/IntegrationTest.php b/src/Tests/IntegrationTest.php index 43db423..b79cc1d 100644 --- a/src/Tests/IntegrationTest.php +++ b/src/Tests/IntegrationTest.php @@ -348,13 +348,13 @@ class IntegrationTest extends WebTestBase { // Configure the facet source by selecting one of the Search API views. $this->drupalGet($facet_add_page); - $this->drupalPostForm(NULL, ['facet_source_id' => 'views_page:search_api_test_view__page_1'], $this->t('Configure facet source')); + $this->drupalPostForm(NULL, ['facet_source_id' => 'search_api:search_api_test_view__page_1'], $this->t('Configure facet source')); // Fill in all fields and make sure the 'field is required' message is no // longer shown. $facet_source_form = [ - 'facet_source_id' => 'views_page:search_api_test_view__page_1', - 'facet_source_configs[views_page:search_api_test_view__page_1][field_identifier]' => 'type', + 'facet_source_id' => 'search_api:search_api_test_view__page_1', + 'facet_source_configs[search_api:search_api_test_view__page_1][field_identifier]' => 'type', ]; $this->drupalPostForm(NULL, $facet_source_form, $this->t('Save')); @@ -542,8 +542,8 @@ class IntegrationTest extends WebTestBase { $this->assertResponse(200); // Check that the expected facet sources and the owl facet are shown. - $this->assertText('views_page:search_api_test_view__block_1'); - $this->assertText('views_page:search_api_test_view__page_1'); + $this->assertText('search_api:search_api_test_view__block_1'); + $this->assertText('search_api:search_api_test_view__page_1'); $this->assertText($name); // Delete the view on which both facet sources are based. @@ -554,8 +554,8 @@ class IntegrationTest extends WebTestBase { // and the facet/facet source are deleted. $this->drupalGet('/admin/config/search/facets'); $this->assertResponse(200); - $this->assertNoText('views_page:search_api_test_view__page_1'); - $this->assertNoText('views_page:search_api_test_view__block_1'); + $this->assertNoText('search_api:search_api_test_view__page_1'); + $this->assertNoText('search_api:search_api_test_view__block_1'); $this->assertNoText($name); } @@ -582,8 +582,8 @@ class IntegrationTest extends WebTestBase { $this->assertResponse(200); // Check that the expected facet sources and the owl facet are shown. - $this->assertText('views_page:search_api_test_view__block_1'); - $this->assertText('views_page:search_api_test_view__page_1'); + $this->assertText('search_api:search_api_test_view__block_1'); + $this->assertText('search_api:search_api_test_view__page_1'); $this->assertText($name); // Delete the view display for the page. @@ -595,8 +595,8 @@ class IntegrationTest extends WebTestBase { // and the facet/facet source are deleted. $this->drupalGet('/admin/config/search/facets'); $this->assertResponse(200); - $this->assertNoText('views_page:search_api_test_view__page_1'); - $this->assertText('views_page:search_api_test_view__block_1'); + $this->assertNoText('search_api:search_api_test_view__page_1'); + $this->assertText('search_api:search_api_test_view__block_1'); $this->assertNoText($name); } @@ -658,8 +658,8 @@ class IntegrationTest extends WebTestBase { $this->assertNoText('Field:'); // Check that the expected facet sources are shown. - $this->assertText('views_page:search_api_test_view__block_1'); - $this->assertText('views_page:search_api_test_view__page_1'); + $this->assertText('search_api:search_api_test_view__block_1'); + $this->assertText('search_api:search_api_test_view__page_1'); } /** @@ -694,7 +694,7 @@ class IntegrationTest extends WebTestBase { // Configure the facet source by selecting one of the Search API views. $this->drupalGet($facet_add_page); - $this->drupalPostForm(NULL, ['facet_source_id' => 'views_page:search_api_test_view__page_1'], $this->t('Configure facet source')); + $this->drupalPostForm(NULL, ['facet_source_id' => 'search_api:search_api_test_view__page_1'], $this->t('Configure facet source')); // The field is still required. $this->drupalPostForm(NULL, $form_values, $this->t('Save')); @@ -703,8 +703,8 @@ class IntegrationTest extends WebTestBase { // Fill in all fields and make sure the 'field is required' message is no // longer shown. $facet_source_form = [ - 'facet_source_id' => 'views_page:search_api_test_view__page_1', - 'facet_source_configs[views_page:search_api_test_view__page_1][field_identifier]' => $facet_type, + 'facet_source_id' => 'search_api:search_api_test_view__page_1', + 'facet_source_configs[search_api:search_api_test_view__page_1][field_identifier]' => $facet_type, ]; $this->drupalPostForm(NULL, $form_values + $facet_source_form, $this->t('Save')); $this->assertNoText('field is required.'); @@ -731,10 +731,10 @@ class IntegrationTest extends WebTestBase { $form_values = [ 'name' => $facet_name, 'id' => $facet_id, - 'facet_source_id' => 'views_page:search_api_test_view__page_1', + 'facet_source_id' => 'search_api:search_api_test_view__page_1', ]; - $facet_source_configs['facet_source_configs[views_page:search_api_test_view__page_1][field_identifier]'] = $facet_type; + $facet_source_configs['facet_source_configs[search_api:search_api_test_view__page_1][field_identifier]'] = $facet_type; // Try to submit a facet with a duplicate machine name after form rebuilding // via facet source submit.