diff --git a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php index 7afb5f9..541cbe8 100644 --- a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php +++ b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Tests\Core\Site\SettingsTest.php + * Contains \Drupal\Tests\Core\Site\SettingsTest. */ namespace Drupal\Tests\Core\Site; @@ -11,9 +11,9 @@ use Drupal\Tests\UnitTestCase; /** - * Tests read only settings. + * Tests read-only settings. * - * @see \Drupal\Core\Site\Settings + * @coversDefaultClass \Drupal\Core\Site\Settings */ class SettingsTest extends UnitTestCase { @@ -25,34 +25,36 @@ class SettingsTest extends UnitTestCase { protected $config = array(); /** - * The settings object to test. + * The class under test. * * @var \Drupal\Core\Site\Settings */ protected $settings; + /** + * {@inheritdoc} + */ public static function getInfo() { return array( - 'name' => 'Read-only settings test', - 'description' => 'Confirm that \Drupal\Core\Site\Settings is working.', + 'name' => '\Drupal\Core\Site\Settings unit test', + 'description' => '', 'group' => 'Common', ); } /** - * Setup a basic configuration array. + * @covers ::__construct */ public function setUp(){ $this->config = array( 'one' => '1', 'two' => '2', ); - $this->settings = new Settings($this->config); } /** - * Tests Settings::get(). + * @covers ::get */ public function testGet() { // Test stored settings. @@ -65,16 +67,16 @@ public function testGet() { } /** - * Test Settings::getAll(). + * @covers ::getAll */ public function testGetAll() { $this->assertEquals($this->config, Settings::getAll()); } /** - * Tests Settings::getInstance(). + * @covers ::getInstance */ - public function testGetSingleton() { + public function testGetInstance() { $singleton = $this->settings->getInstance(); $this->assertEquals($singleton, $this->settings); } diff --git a/index.php b/index.php index 4916a6c..a453ecc 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,8 @@ * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory. */ +use Drupal\Core\Site\Settings; + require_once __DIR__ . '/core/vendor/autoload.php'; require_once __DIR__ . '/core/includes/bootstrap.inc'; @@ -16,7 +18,7 @@ } catch (Exception $e) { $message = 'If you have just changed code (for example deployed a new module or moved an existing one) read http://drupal.org/documentation/rebuild'; - if (\Drupal\Component\Utility\Settings::get('rebuild_access', FALSE)) { + if (Settings::get('rebuild_access', FALSE)) { $rebuild_path = $GLOBALS['base_url'] . '/rebuild.php'; $message .= " or run the rebuild script"; }