Mercurial > hg > isophonics-drupal-site
comparison core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Tests\locale\Functional; | |
4 | |
5 use Drupal\Tests\tour\Functional\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 } |