protected function TourTest::findTip in Drupal 9
Find specific tips by their parameters in the list of tips.
Parameters
array $params: The list of search parameters and their values.
Return value
array A list of tips which match the parameters.
1 call to TourTest::findTip()
- TourTest::testTourFunctionality in core/
modules/ tour/ tests/ src/ Functional/ TourTest.php - Tests tour functionality.
File
- core/
modules/ tour/ tests/ src/ Functional/ TourTest.php, line 264
Class
- TourTest
- Tests the functionality of tour tips.
Namespace
Drupal\Tests\tour\FunctionalCode
protected function findTip(array $params) {
$tips = $this
->getTourTips();
$elements = [];
foreach ($tips as $tip) {
foreach ($params as $param => $value) {
if (isset($tip[$param]) && $tip[$param] != $value) {
continue 2;
}
}
$elements[] = $tip;
}
return $elements;
}