b77fe35a725a573e0d2ce5d6f32684676efe6a45
[yaffs-website] / web / core / tests / Drupal / FunctionalTests / Installer / SiteNameTest.php
1 <?php
2
3 namespace Drupal\FunctionalTests\Installer;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8  * Tests that the site name can be set during a non-interactive installation.
9  *
10  * @group Installer
11  */
12 class SiteNameTest extends BrowserTestBase {
13
14   /**
15    * The site name to be used when testing.
16    *
17    * @var string
18    */
19   protected $siteName;
20
21   /**
22    * {@inheritdoc}
23    */
24   protected function installParameters() {
25     $this->siteName = $this->randomMachineName();
26     $parameters = parent::installParameters();
27     $parameters['forms']['install_configure_form']['site_name'] = $this->siteName;
28     return $parameters;
29   }
30
31   /**
32    * Tests that the desired site name appears on the page after installation.
33    */
34   public function testSiteName() {
35     $this->drupalGet('');
36     $this->assertRaw($this->siteName, 'The site name that was set during the installation appears on the front page after installation.');
37   }
38
39 }