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