annotate core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents
children af1871eacc83
rev   line source
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@16 53 // FunctionalTestSetupTrait::installParameters() uses
Chris@16 54 // simpletest@example.com as mail address.
Chris@16 55 $skipped_config['contact.form.feedback'][] = '- simpletest@example.com';
Chris@16 56 // \Drupal\filter\Entity\FilterFormat::toArray() drops the roles of filter
Chris@16 57 // formats.
Chris@16 58 $skipped_config['filter.format.basic_html'][] = 'roles:';
Chris@16 59 $skipped_config['filter.format.basic_html'][] = '- authenticated';
Chris@16 60 $skipped_config['filter.format.full_html'][] = 'roles:';
Chris@16 61 $skipped_config['filter.format.full_html'][] = '- administrator';
Chris@16 62 $skipped_config['filter.format.restricted_html'][] = 'roles:';
Chris@16 63 $skipped_config['filter.format.restricted_html'][] = '- anonymous';
Chris@16 64
Chris@16 65 $this->assertInstalledConfig($skipped_config);
Chris@16 66 }
Chris@16 67
Chris@16 68 }