comparison core/modules/tour/tests/src/Functional/TourTest.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
1 <?php 1 <?php
2 2
3 namespace Drupal\Tests\tour\Functional; 3 namespace Drupal\Tests\tour\Functional;
4 4
5 use Drupal\Core\Url;
5 use Drupal\language\Entity\ConfigurableLanguage; 6 use Drupal\language\Entity\ConfigurableLanguage;
6 use Drupal\tour\Entity\Tour; 7 use Drupal\tour\Entity\Tour;
7 8
8 /** 9 /**
9 * Tests the functionality of tour tips. 10 * Tests the functionality of tour tips.
64 $this->assertTourTips(); 65 $this->assertTourTips();
65 66
66 $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./p//a[@href=:href and contains(., :text)]]', [ 67 $elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./p//a[@href=:href and contains(., :text)]]', [
67 ':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1', 68 ':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1',
68 ':data_id' => 'tour-test-1', 69 ':data_id' => 'tour-test-1',
69 ':href' => \Drupal::url('<front>', [], ['absolute' => TRUE]), 70 ':href' => Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(),
70 ':text' => 'Drupal', 71 ':text' => 'Drupal',
71 ]); 72 ]);
72 $this->assertEqual(count($elements), 1, 'Found Token replacement.'); 73 $this->assertEqual(count($elements), 1, 'Found Token replacement.');
73 74
74 $elements = $this->cssSelect("li[data-id=tour-test-1] h2:contains('The first tip')"); 75 $elements = $this->cssSelect("li[data-id=tour-test-1] h2:contains('The first tip')");