3 namespace Drupal\tour\Tests;
6 * A legacy test for \Drupal\tour\Tests\TourTestBase.
10 class TourTest extends TourTestBase {
17 public static $modules = ['block', 'tour', 'locale', 'language', 'tour_test'];
20 * Tour tip attributes to be tested. Keyed by the path.
23 * An array of tip attributes, keyed by path.
27 'data-id' => 'tour-test-1',
28 'data-class' => 'tour-test-1',
33 * An admin user with administrative permissions for tour.
35 * @var \Drupal\user\UserInterface
40 * The permissions required for a logged in user to test tour tips.
43 * A list of permissions.
45 protected $permissions = ['access tour'];
50 protected function setUp() {
53 // Make sure we are using distinct default and administrative themes for
54 // the duration of these tests.
55 $this->container->get('theme_handler')->install(['bartik', 'seven']);
56 $this->config('system.theme')
57 ->set('default', 'bartik')
58 ->set('admin', 'seven')
61 $this->permissions[] = 'view the administration theme';
63 // Create an admin user to view tour tips.
64 $this->adminUser = $this->drupalCreateUser($this->permissions);
65 $this->drupalLogin($this->adminUser);
67 $this->drupalPlaceBlock('local_actions_block', [
76 public function testTips() {
77 foreach ($this->tips as $path => $attributes) {
78 $this->drupalGet($path);
79 $this->assertTourTips($attributes);