getTourTips example

public function testTourFunctionality() {
    // Navigate to tour-test-1 and verify the tour_test_1 tip is found with appropriate classes.     $this->drupalGet('tour-test-1');

    // Test the TourTestBase class assertTourTips() method.     $tips = [];
    $tips[] = ['data-id' => 'tour-test-1'];
    $tips[] = ['data-class' => 'tour-test-5'];
    $this->assertTourTips($tips);
    $this->assertTourTips();

    $tips = $this->getTourTips();

    $href = Url::fromRoute('<front>', []['absolute' => TRUE])->toString();
    $elements = [];
    foreach ($tips as $tip) {
      if ($tip['id'] == 'tour-test-1' && $tip['module'] == 'tour_test' && $tip['type'] == 'text' && str_contains($tip['body']$href) && str_contains($tip['body'], 'Drupal')) {
        $elements[] = $tip;
      }
    }
    $this->assertCount(1, $elements, 'Found Token replacement.');

    $elements = $this->findTip([
      
Home | Imprint | This part of the site doesn't use cookies.