You are here

protected function CoreViewsIntegrationTest::goToDeleteFacetPage in Core Views Facets 8

Go to the Delete Facet Page using the facet name.

Parameters

string $facet_name: The name of the facet.

File

tests/src/Functional/CoreViewsIntegrationTest.php, line 373

Class

CoreViewsIntegrationTest
Tests the overall functionality of the Facets admin UI.

Namespace

Drupal\Tests\core_views_facets\Functional

Code

protected function goToDeleteFacetPage($facet_name) {
  $facet_id = $this
    ->convertNameToMachineName($facet_name);
  $facet_delete_page = Url::fromRoute('entity.facets_facet.delete_form', [
    'facets_facet' => $facet_id,
  ]);

  // Go to the facet delete page and make the warning is shown.
  $this
    ->drupalGet($facet_delete_page);
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}