Commit 01dbc00f authored by xjm's avatar xjm
Browse files

More trailing whitespace and the addition of an article.

parent 24aa9143
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* @file * @file
* Tests for Configuration module. * Tests for the Configuration module.
*/ */
use Drupal\Core\Config\SignedFileStorage; use Drupal\Core\Config\SignedFileStorage;
...@@ -129,7 +129,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase { ...@@ -129,7 +129,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
$nested_array_key = 'nested.array'; $nested_array_key = 'nested.array';
$true_key = 'true'; $true_key = 'true';
$false_key = 'false'; $false_key = 'false';
// Attempt to read non-existing configuration. // Attempt to read non-existing configuration.
$config = config($name); $config = config($name);
...@@ -151,7 +151,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase { ...@@ -151,7 +151,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
// Add a nested value // Add a nested value
$config->set($nested_key, $nested_value); $config->set($nested_key, $nested_value);
// Add an array // Add an array
$config->set($array_key, $array_value); $config->set($array_key, $array_value);
...@@ -186,7 +186,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase { ...@@ -186,7 +186,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
// Read array // Read array
$this->assertEqual($config->get($array_key), $array_value, t('Top level array configuration value found.')); $this->assertEqual($config->get($array_key), $array_value, t('Top level array configuration value found.'));
// Read nested array // Read nested array
$this->assertEqual($config->get($nested_array_key), $array_value, t('Nested array configuration value found.')); $this->assertEqual($config->get($nested_array_key), $array_value, t('Nested array configuration value found.'));
...@@ -207,12 +207,12 @@ class ConfigFileContentTestCase extends DrupalWebTestCase { ...@@ -207,12 +207,12 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
// Unset a top level value // Unset a top level value
$config->clear($key); $config->clear($key);
// Unset a nested value // Unset a nested value
$config->clear($nested_key); $config->clear($nested_key);
$config->save(); $config->save();
$config = config($name); $config = config($name);
// Read unset top level value // Read unset top level value
$this->assertNull($config->get($key), t('Top level value unset.')); $this->assertNull($config->get($key), t('Top level value unset.'));
...@@ -223,12 +223,12 @@ class ConfigFileContentTestCase extends DrupalWebTestCase { ...@@ -223,12 +223,12 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
$config = config('foo.baz'); $config = config('foo.baz');
$config->set($key, $value); $config->set($key, $value);
$config->save(); $config->save();
// Test chained set()->save() // Test chained set()->save()
$chained_name = 'biff.bang'; $chained_name = 'biff.bang';
$config = config($chained_name); $config = config($chained_name);
$config->set($key, $value)->save(); $config->set($key, $value)->save();
// Verify the database entry exists from a chained save. // Verify the database entry exists from a chained save.
$db_config = db_query('SELECT * FROM {config} WHERE name = :name', array(':name' => $chained_name))->fetch(); $db_config = db_query('SELECT * FROM {config} WHERE name = :name', array(':name' => $chained_name))->fetch();
$this->assertEqual($db_config->name, $chained_name, t('After saving configuration by chaining through set(), active store has a record for %name', array('%name' => $chained_name))); $this->assertEqual($db_config->name, $chained_name, t('After saving configuration by chaining through set(), active store has a record for %name', array('%name' => $chained_name)));
...@@ -240,18 +240,18 @@ class ConfigFileContentTestCase extends DrupalWebTestCase { ...@@ -240,18 +240,18 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
// two elements. // two elements.
$files = config_get_signed_file_storage_names_with_prefix('foo'); $files = config_get_signed_file_storage_names_with_prefix('foo');
$this->assertEqual(count($files), 2, 'Two files listed with the prefix \'foo\'.'); $this->assertEqual(count($files), 2, 'Two files listed with the prefix \'foo\'.');
// Get file listing for all files starting with 'biff'. Should return // Get file listing for all files starting with 'biff'. Should return
// one element. // one element.
$files = config_get_signed_file_storage_names_with_prefix('biff'); $files = config_get_signed_file_storage_names_with_prefix('biff');
$this->assertEqual(count($files), 1, 'One file listed with the prefix \'biff\'.'); $this->assertEqual(count($files), 1, 'One file listed with the prefix \'biff\'.');
// Get file listing for all files starting with 'foo.bar'. Should return // Get file listing for all files starting with 'foo.bar'. Should return
// one element. // one element.
$files = config_get_signed_file_storage_names_with_prefix('foo.bar'); $files = config_get_signed_file_storage_names_with_prefix('foo.bar');
$this->assertEqual(count($files), 1, 'One file listed with the prefix \'foo.bar\'.'); $this->assertEqual(count($files), 1, 'One file listed with the prefix \'foo.bar\'.');
// Get file listing for all files starting with 'bar'. Should return // Get file listing for all files starting with 'bar'. Should return
// an empty array. // an empty array.
$files = config_get_signed_file_storage_names_with_prefix('bar'); $files = config_get_signed_file_storage_names_with_prefix('bar');
$this->assertEqual($files, array(), 'No files listed with the prefix \'bar\'.'); $this->assertEqual($files, array(), 'No files listed with the prefix \'bar\'.');
...@@ -264,7 +264,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase { ...@@ -264,7 +264,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
$db_config = db_query('SELECT * FROM {config} WHERE name = :name', array(':name' => $name))->fetch(); $db_config = db_query('SELECT * FROM {config} WHERE name = :name', array(':name' => $name))->fetch();
$this->assertIdentical($db_config, FALSE); $this->assertIdentical($db_config, FALSE);
$this->assertFalse(file_exists($config_dir . '/' . $name . '.' . $this->fileExtension)); $this->assertFalse(file_exists($config_dir . '/' . $name . '.' . $this->fileExtension));
// Attempt to delete non-existing configuration. // Attempt to delete non-existing configuration.
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment