protected function TourTest::getTourTips in Drupal 9
Gets tour tips from the JavaScript drupalSettings variable.
Return value
array A list of tips and their data.
2 calls to TourTest::getTourTips()
- TourTest::findTip in core/
modules/ tour/ tests/ src/ Functional/ TourTest.php - Find specific tips by their parameters in the list of tips.
- TourTest::testTourFunctionality in core/
modules/ tour/ tests/ src/ Functional/ TourTest.php - Tests tour functionality.
File
- core/
modules/ tour/ tests/ src/ Functional/ TourTest.php, line 243
Class
- TourTest
- Tests the functionality of tour tips.
Namespace
Drupal\Tests\tour\FunctionalCode
protected function getTourTips() {
$tips = [];
$drupalSettings = $this
->getDrupalSettings();
if (isset($drupalSettings['_tour_internal'])) {
foreach ($drupalSettings['_tour_internal'] as $tip) {
$tips[] = $tip;
}
}
return $tips;
}