diff core/modules/language/tests/src/Functional/LanguageTourTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/modules/language/tests/src/Functional/LanguageTourTest.php	Wed Nov 29 16:09:58 2017 +0000
@@ -0,0 +1,62 @@
+<?php
+
+namespace Drupal\Tests\language\Functional;
+
+use Drupal\Tests\tour\Functional\TourTestBase;
+
+/**
+ * Tests tour functionality.
+ *
+ * @group tour
+ */
+class LanguageTourTest extends TourTestBase {
+
+  /**
+   * An admin user with administrative permissions for views.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['block', 'language', 'tour'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->adminUser = $this->drupalCreateUser(['administer languages', 'access tour']);
+    $this->drupalLogin($this->adminUser);
+    $this->drupalPlaceBlock('local_actions_block');
+  }
+
+  /**
+   * Tests language tour tip availability.
+   */
+  public function testLanguageTour() {
+    $this->drupalGet('admin/config/regional/language');
+    $this->assertTourTips();
+  }
+
+  /**
+   * Go to add language page and check the tour tooltips.
+   */
+  public function testLanguageAddTour() {
+    $this->drupalGet('admin/config/regional/language/add');
+    $this->assertTourTips();
+  }
+
+  /**
+   * Go to edit language page and check the tour tooltips.
+   */
+  public function testLanguageEditTour() {
+    $this->drupalGet('admin/config/regional/language/edit/en');
+    $this->assertTourTips();
+  }
+
+}