SiteNameTest.php in Drupal 8
File
core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php
View source
<?php
namespace Drupal\FunctionalTests\Installer;
use Drupal\Tests\BrowserTestBase;
class SiteNameTest extends BrowserTestBase {
protected $siteName;
protected $defaultTheme = 'stark';
protected function installParameters() {
$this->siteName = $this
->randomMachineName();
$parameters = parent::installParameters();
$parameters['forms']['install_configure_form']['site_name'] = $this->siteName;
return $parameters;
}
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.');
}
}
Classes
Name |
Description |
SiteNameTest |
Tests that the site name can be set during a non-interactive installation. |