Mercurial > hg > isophonics-drupal-site
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/system/src/Tests/Installer/SiteNameTest.php Wed Nov 29 16:09:58 2017 +0000 @@ -0,0 +1,39 @@ +<?php + +namespace Drupal\system\Tests\Installer; + +use Drupal\simpletest\WebTestBase; + +/** + * Tests that the site name can be set during a non-interactive installation. + * + * @group Installer + */ +class SiteNameTest extends WebTestBase { + + /** + * The site name to be used when testing. + * + * @var string + */ + protected $siteName; + + /** + * {@inheritdoc} + */ + protected function installParameters() { + $this->siteName = $this->randomMachineName(); + $parameters = parent::installParameters(); + $parameters['forms']['install_configure_form']['site_name'] = $this->siteName; + return $parameters; + } + + /** + * Tests that the desired site name appears on the page after installation. + */ + public function testSiteName() { + $this->drupalGet(''); + $this->assertRaw($this->siteName, 'The site name that was set during the installation appears on the front page after installation.'); + } + +}