StandardInstallerTest.php 2.1 KB

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