Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\system\Tests\Installer;
|
Chris@0
|
4
|
Chris@0
|
5 /**
|
Chris@0
|
6 * Tests the interactive installer installing the standard profile.
|
Chris@0
|
7 *
|
Chris@0
|
8 * @group Installer
|
Chris@0
|
9 */
|
Chris@0
|
10 class StandardInstallerTest extends ConfigAfterInstallerTestBase {
|
Chris@0
|
11
|
Chris@0
|
12 /**
|
Chris@0
|
13 * {@inheritdoc}
|
Chris@0
|
14 */
|
Chris@0
|
15 protected $profile = 'standard';
|
Chris@0
|
16
|
Chris@0
|
17 /**
|
Chris@0
|
18 * Ensures that the user page is available after installation.
|
Chris@0
|
19 */
|
Chris@0
|
20 public function testInstaller() {
|
Chris@0
|
21 // Verify that the confirmation message appears.
|
Chris@0
|
22 require_once \Drupal::root() . '/core/includes/install.inc';
|
Chris@0
|
23 $this->assertRaw(t('Congratulations, you installed @drupal!', [
|
Chris@0
|
24 '@drupal' => drupal_install_profile_distribution_name(),
|
Chris@0
|
25 ]));
|
Chris@0
|
26 }
|
Chris@0
|
27
|
Chris@0
|
28 /**
|
Chris@0
|
29 * {@inheritdoc}
|
Chris@0
|
30 */
|
Chris@0
|
31 protected function setUpSite() {
|
Chris@0
|
32 // Test that the correct theme is being used.
|
Chris@0
|
33 $this->assertNoRaw('bartik');
|
Chris@0
|
34 $this->assertRaw('themes/seven/css/theme/install-page.css');
|
Chris@0
|
35 parent::setUpSite();
|
Chris@0
|
36 }
|
Chris@0
|
37
|
Chris@0
|
38 /**
|
Chris@0
|
39 * {@inheritdoc}
|
Chris@0
|
40 */
|
Chris@0
|
41 protected function curlExec($curl_options, $redirect = FALSE) {
|
Chris@0
|
42 // Ensure that we see the classy progress CSS on the batch page.
|
Chris@0
|
43 // Batch processing happens as part of HTTP redirects, so we can access the
|
Chris@0
|
44 // HTML of the batch page.
|
Chris@0
|
45 if (strpos($curl_options[CURLOPT_URL], '&id=1&op=do_nojs') !== FALSE) {
|
Chris@0
|
46 $this->assertRaw('themes/classy/css/components/progress.css');
|
Chris@0
|
47 }
|
Chris@0
|
48 return parent::curlExec($curl_options, $redirect);
|
Chris@0
|
49 }
|
Chris@0
|
50
|
Chris@0
|
51 /**
|
Chris@0
|
52 * Ensures that the exported standard configuration is up to date.
|
Chris@0
|
53 */
|
Chris@0
|
54 public function testStandardConfig() {
|
Chris@0
|
55 $skipped_config = [];
|
Chris@0
|
56 // \Drupal\simpletest\WebTestBase::installParameters() uses
|
Chris@0
|
57 // simpletest@example.com as mail address.
|
Chris@0
|
58 $skipped_config['contact.form.feedback'][] = '- simpletest@example.com';
|
Chris@0
|
59 // \Drupal\filter\Entity\FilterFormat::toArray() drops the roles of filter
|
Chris@0
|
60 // formats.
|
Chris@0
|
61 $skipped_config['filter.format.basic_html'][] = 'roles:';
|
Chris@0
|
62 $skipped_config['filter.format.basic_html'][] = '- authenticated';
|
Chris@0
|
63 $skipped_config['filter.format.full_html'][] = 'roles:';
|
Chris@0
|
64 $skipped_config['filter.format.full_html'][] = '- administrator';
|
Chris@0
|
65 $skipped_config['filter.format.restricted_html'][] = 'roles:';
|
Chris@0
|
66 $skipped_config['filter.format.restricted_html'][] = '- anonymous';
|
Chris@0
|
67
|
Chris@0
|
68 $this->assertInstalledConfig($skipped_config);
|
Chris@0
|
69 }
|
Chris@0
|
70
|
Chris@0
|
71 }
|