comparison core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
57 // Place a custom local translation in the translations directory. 57 // Place a custom local translation in the translations directory.
58 mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); 58 mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
59 file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); 59 file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
60 60
61 parent::visitInstaller(); 61 parent::visitInstaller();
62 }
62 63
64 /**
65 * {@inheritdoc}
66 */
67 protected function setUpLanguage() {
68 // This step is skipped, because the distribution profile uses a fixed
69 // language.
70 }
71
72 /**
73 * {@inheritdoc}
74 */
75 protected function setUpProfile() {
76 // This step is skipped, because there is a distribution profile.
77 }
78
79 /**
80 * {@inheritdoc}
81 */
82 protected function setUpSettings() {
63 // The language should have been automatically detected, all following 83 // The language should have been automatically detected, all following
64 // screens should be translated already. 84 // screens should be translated already.
65 $elements = $this->xpath('//input[@type="submit"]/@value'); 85 $elements = $this->xpath('//input[@type="submit"]/@value');
66 $this->assertEqual((string) current($elements), 'Save and continue de'); 86 $this->assertEqual((string) current($elements), 'Save and continue de');
67 $this->translations['Save and continue'] = 'Save and continue de'; 87 $this->translations['Save and continue'] = 'Save and continue de';
74 $this->assertRaw($this->info['distribution']['name']); 94 $this->assertRaw($this->info['distribution']['name']);
75 // Verify that the requested theme is used. 95 // Verify that the requested theme is used.
76 $this->assertRaw($this->info['distribution']['install']['theme']); 96 $this->assertRaw($this->info['distribution']['install']['theme']);
77 // Verify that the "Choose profile" step does not appear. 97 // Verify that the "Choose profile" step does not appear.
78 $this->assertNoText('profile'); 98 $this->assertNoText('profile');
99
100 parent::setUpSettings();
79 } 101 }
80 102
81 /**
82 * {@inheritdoc}
83 */
84 protected function setUpLanguage() {
85 // This step is skipped, because the distribution profile uses a fixed
86 // language.
87 }
88
89 /**
90 * {@inheritdoc}
91 */
92 protected function setUpProfile() {
93 // This step is skipped, because there is a distribution profile.
94 }
95 103
96 /** 104 /**
97 * Confirms that the installation succeeded. 105 * Confirms that the installation succeeded.
98 */ 106 */
99 public function testInstalled() { 107 public function testInstalled() {