protected function TestHelperTrait::assertFacetLabel in Facets 8
Passes if a facet with the specified label is found and is a link.
See also
\Drupal\simpletest\AssertContentTrait::assertLink
30 calls to TestHelperTrait::assertFacetLabel()
- HierarchicalFacetIntegrationTest::testHierarchicalFacet in modules/
facets_summary/ tests/ src/ Functional/ HierarchicalFacetIntegrationTest.php - Test the hierarchical facets functionality.
- HierarchicalFacetIntegrationTest::testWeightSort in tests/
src/ Functional/ HierarchicalFacetIntegrationTest.php - Tests sorting by weight of a taxonomy term.
- HierarchicalFacetIntegrationTest::verifyExpandHierarchyOption in tests/
src/ Functional/ HierarchicalFacetIntegrationTest.php - Verify the "Always expand hierarchy" option is working.
- HierarchicalFacetIntegrationTest::verifyKeepHierarchyParentsActiveOption in tests/
src/ Functional/ HierarchicalFacetIntegrationTest.php - Verify the "Keep parents active" option is working.
- HierarchicalFacetIntegrationTest::verifyUseHierarchyOption in tests/
src/ Functional/ HierarchicalFacetIntegrationTest.php - Verify the backend option "Use hierarchy" is working.
File
- tests/
src/ Functional/ TestHelperTrait.php, line 18
Class
- TestHelperTrait
- Adds helpers for test methods.
Namespace
Drupal\Tests\facets\FunctionalCode
protected function assertFacetLabel($label, $index = 0, $message = '', $group = 'Other') {
$links = $this
->findFacetLink($label);
$message = $message ? $message : strtr('Link with label %label found.', [
'%label' => $label,
]);
return $this
->assertArrayHasKey($index, $links, $message, $group);
}