diff core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents c2387f117808
children af1871eacc83
line wrap: on
line diff
--- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php	Thu Feb 28 13:21:36 2019 +0000
@@ -3,7 +3,6 @@
 namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Serialization\Yaml;
-use Drupal\Core\Site\Settings;
 
 /**
  * Tests distribution profile support.
@@ -29,6 +28,7 @@
         'name' => 'My Distribution',
         'install' => [
           'theme' => 'bartik',
+          'finish_url' => '/myrootuser',
         ],
       ],
     ];
@@ -36,6 +36,7 @@
     $path = $this->siteDirectory . '/profiles/mydistro';
     mkdir($path, 0777, TRUE);
     file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
+    file_put_contents("$path/mydistro.install", "<?php function mydistro_install() {\Drupal::service('path.alias_storage')->save('/user/1', '/myrootuser');}");
   }
 
   /**
@@ -65,14 +66,13 @@
    * Confirms that the installation succeeded.
    */
   public function testInstalled() {
-    $this->assertUrl('user/1');
+    $this->assertUrl('myrootuser');
     $this->assertResponse(200);
     // Confirm that we are logged-in after installation.
     $this->assertText($this->rootUser->getUsername());
 
     // Confirm that Drupal recognizes this distribution as the current profile.
     $this->assertEqual(\Drupal::installProfile(), 'mydistro');
-    $this->assertEqual(Settings::get('install_profile'), 'mydistro', 'The install profile has been written to settings.php.');
     $this->assertEqual($this->config('core.extension')->get('profile'), 'mydistro', 'The install profile has been written to core.extension configuration.');
   }