comparison core/modules/system/src/Tests/Installer/SiteNameTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\system\Tests\Installer;
4
5 use Drupal\simpletest\WebTestBase;
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 WebTestBase {
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 }