protected function TestHelperTrait::checkFacetIsActive in Facets 8
Check if a facet is active by providing a label for it.
We'll check by activeness by seeing that there's a span with (-) in the same link as the label.
Parameters
string $label: The label of a facet that should be active.
Return value
bool Returns true when the facet is found and is active.
16 calls to TestHelperTrait::checkFacetIsActive()
- BreadcrumbIntegrationTest::breadcrumbTest in tests/
src/ Functional/ BreadcrumbIntegrationTest.php - Tests Breadcrumb with the given config.
- FacetsUrlGeneratorTest::testWithAlreadySetFacet in tests/
src/ Functional/ FacetsUrlGeneratorTest.php - Create url with already set facet.
- HierarchicalFacetIntegrationTest::testHierarchicalFacet in modules/
facets_summary/ tests/ src/ Functional/ HierarchicalFacetIntegrationTest.php - Test the hierarchical facets functionality.
- HierarchicalFacetIntegrationTest::testHierarchyBreadcrumb in tests/
src/ Functional/ HierarchicalFacetIntegrationTest.php - Tests hierarchy breadcrumbs.
- HierarchicalFacetIntegrationTest::verifyEnableParentWhenChildGetsDisabledOption in tests/
src/ Functional/ HierarchicalFacetIntegrationTest.php - Verify the "Enable parent when child gets disabled" option is working.
File
- tests/
src/ Functional/ TestHelperTrait.php, line 37
Class
- TestHelperTrait
- Adds helpers for test methods.
Namespace
Drupal\Tests\facets\FunctionalCode
protected function checkFacetIsActive($label) {
$links = $this
->findFacetLink($label);
return $this
->assertArrayHasKey(0, $links);
}