Backup of db before drupal security update
[yaffs-website] / web / core / modules / locale / src / Tests / LocaleTranslateStringTourTest.php
1 <?php
2
3 namespace Drupal\locale\Tests;
4
5 use Drupal\tour\Tests\TourTestBase;
6
7 /**
8  * Tests the Translate Interface tour.
9  *
10  * @group locale
11  */
12 class LocaleTranslateStringTourTest extends TourTestBase {
13
14   /**
15    * An admin user with administrative permissions to translate.
16    *
17    * @var \Drupal\user\UserInterface
18    */
19   protected $adminUser;
20
21   /**
22    * Modules to enable.
23    *
24    * @var array
25    */
26   public static $modules = ['locale', 'tour'];
27
28   /**
29    * {@inheritdoc}
30    */
31   protected function setUp() {
32     parent::setUp();
33     $this->adminUser = $this->drupalCreateUser(['translate interface', 'access tour', 'administer languages']);
34     $this->drupalLogin($this->adminUser);
35   }
36
37   /**
38    * Tests locale tour tip availability.
39    */
40   public function testTranslateStringTourTips() {
41     // Add another language so there are no missing form items.
42     $edit = [];
43     $edit['predefined_langcode'] = 'es';
44     $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language'));
45
46     $this->drupalGet('admin/config/regional/translate');
47     $this->assertTourTips();
48   }
49
50 }