protected function TestHelperTrait::checkClickedFacetUrl in Facets 8
Checks that the url after clicking a facet is as expected.
Parameters
\Drupal\Core\Url $url: The expected url we end on.
3 calls to TestHelperTrait::checkClickedFacetUrl()
- UrlIntegrationTest::testFacetUrlCanBeChanged in tests/
src/ Functional/ UrlIntegrationTest.php - Tests that modules can change the facet url.
- UrlIntegrationTest::testIncompleteFacetUrl in tests/
src/ Functional/ UrlIntegrationTest.php - Regression test for #2871475.
- UrlIntegrationTest::testUrlIntegration in tests/
src/ Functional/ UrlIntegrationTest.php - Tests various url integration things.
File
- tests/
src/ Functional/ TestHelperTrait.php, line 115
Class
- TestHelperTrait
- Adds helpers for test methods.
Namespace
Drupal\Tests\facets\FunctionalCode
protected function checkClickedFacetUrl(Url $url) {
$this
->drupalGet('search-api-test-fulltext');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertFacetLabel('item');
$this
->assertFacetLabel('article');
$this
->clickLink('item');
$this
->assertSession()
->statusCodeEquals(200);
$this
->checkFacetIsActive('item');
$this
->assertFacetLabel('article');
$this
->assertSession()
->addressEquals($url);
}