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