InstallerExistingSettingsNoProfileTest.php in Zircon Profile 8
File
core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php
View source
<?php
namespace Drupal\system\Tests\Installer;
use Drupal\Core\DrupalKernel;
use Drupal\Core\Site\Settings;
use Drupal\simpletest\InstallerTestBase;
use Drupal\Core\Database\Database;
use Symfony\Component\HttpFoundation\Request;
class InstallerExistingSettingsNoProfileTest extends InstallerTestBase {
protected function setUp() {
$this->settings['settings']['hash_salt'] = (object) array(
'value' => __CLASS__,
'required' => TRUE,
);
$connection_info = Database::getConnectionInfo();
unset($connection_info['default']['pdo']);
unset($connection_info['default']['init_commands']);
$this->settings['databases']['default'] = (object) array(
'value' => $connection_info,
'required' => TRUE,
);
$this->settings['config_directories'] = array(
CONFIG_SYNC_DIRECTORY => (object) array(
'value' => DrupalKernel::findSitePath(Request::createFromGlobals()) . '/files/config_sync',
'required' => TRUE,
),
);
mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE);
parent::setUp();
}
protected function setUpSettings() {
}
public function testInstaller() {
$this
->assertUrl('user/1');
$this
->assertResponse(200);
$this
->assertEqual('testing', Settings::get('install_profile'));
}
}