LanguageTourTest.php 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
<?php

/**
 * @file
 * Contains \Drupal\language\Tests\LanguageTourTest.
 */

namespace Drupal\language\Tests;

use Drupal\tour\Tests\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 = array('language', 'tour');

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->adminUser = $this->drupalCreateUser(array('administer languages', 'access tour'));
    $this->drupalLogin($this->adminUser);
  }

  /**
   * 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();
  }

}