diff --git a/core/includes/common.inc b/core/includes/common.inc
index 4e4409f..7955f95 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -15,7 +15,7 @@
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Yaml\Parser;
 use Symfony\Component\Yaml\Exception\ParseException;
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Datetime\DrupalDateTime;
 use Drupal\Core\Routing\GeneratorNotInitializedException;
diff --git a/core/includes/utility.inc b/core/includes/utility.inc
index b18c941..6603166 100644
--- a/core/includes/utility.inc
+++ b/core/includes/utility.inc
@@ -6,7 +6,7 @@
  */
 
 use Drupal\Component\Utility\Variable;
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\Cache\Cache;
 
 /**
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index a763164..585eb87 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core;
 
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\Config\BootstrapConfigStorageFactory;
 use Drupal\Core\CoreServiceProvider;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
diff --git a/core/lib/Drupal/Component/PhpStorage/PhpStorageFactory.php b/core/lib/Drupal/Core/PhpStorage/PhpStorageFactory.php
similarity index 97%
rename from core/lib/Drupal/Component/PhpStorage/PhpStorageFactory.php
rename to core/lib/Drupal/Core/PhpStorage/PhpStorageFactory.php
index 0939799..456c54a 100644
--- a/core/lib/Drupal/Component/PhpStorage/PhpStorageFactory.php
+++ b/core/lib/Drupal/Core/PhpStorage/PhpStorageFactory.php
@@ -5,7 +5,7 @@
  * Definition of Drupal\Component\PhpStorage\PhpStorageFactory.
  */
 
-namespace Drupal\Component\PhpStorage;
+namespace Drupal\Core\PhpStorage;
 
 use Drupal\Component\Utility\Settings;
 use Drupal\Core\StreamWrapper\PublicStream;
diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
index 2bbf3c9..0047894 100644
--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\Template;
 
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Extension\ThemeHandlerInterface;
 
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index f196969..797f968 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -5,7 +5,7 @@
  * Add language handling functionality to Drupal.
  */
 
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\Language\Language;
 use Drupal\language\ConfigurableLanguageManager;
 use Drupal\language\ConfigurableLanguageManagerInterface;
diff --git a/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php b/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php
index a7fb8f6..29d6484 100644
--- a/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php
+++ b/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\language;
 
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Language\Language;
diff --git a/core/modules/language/lib/Drupal/language/EventSubscriber/ConfigSubscriber.php b/core/modules/language/lib/Drupal/language/EventSubscriber/ConfigSubscriber.php
index 82b6f9d..1373a25 100644
--- a/core/modules/language/lib/Drupal/language/EventSubscriber/ConfigSubscriber.php
+++ b/core/modules/language/lib/Drupal/language/EventSubscriber/ConfigSubscriber.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\language\EventSubscriber;
 
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\Config\ConfigCrudEvent;
 use Drupal\Core\Config\ConfigEvents;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
diff --git a/core/modules/system/lib/Drupal/system/PhpStorage/MockPhpStorage.php b/core/modules/system/lib/Drupal/system/PhpStorage/MockPhpStorage.php
new file mode 100644
index 0000000..0ef5e62
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/PhpStorage/MockPhpStorage.php
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\PhpStorage\MockPhpStorage.
+ */
+
+namespace Drupal\system\PhpStorage;
+
+/**
+ * Mock PHP storage class used for testing.
+ */
+class MockPhpStorage {
+
+  /**
+   * The storage configuration.
+   *
+   * @var array
+   */
+  protected $configuration;
+
+  /**
+   * Constructs a MockPhpStorage object.
+   *
+   * @param array $configuration
+   */
+  public function __construct(array $configuration) {
+    $this->configuration = $configuration;
+  }
+
+  /**
+   * Gets the configuration data.
+   */
+  public function getConfiguration() {
+    return $this->configuration;
+  }
+
+  /**
+   * Gets a single configuration key.
+   */
+  public function getConfigurationValue($key) {
+    return isset($this->configuration[$key]) ? $this->configuration[$key] : NULL;
+  }
+
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/PhpStorage/PhpStorageFactoryTest.php b/core/modules/system/lib/Drupal/system/Tests/PhpStorage/PhpStorageFactoryTest.php
new file mode 100644
index 0000000..5ff16d3
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/PhpStorage/PhpStorageFactoryTest.php
@@ -0,0 +1,98 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Session\PhpStorage\PhpStorageFactoryTest.
+ */
+
+namespace Drupal\system\Tests\PhpStorage;
+
+use Drupal\Component\PhpStorage\MTimeProtectedFileStorage;
+use Drupal\Component\Utility\Settings;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
+use Drupal\Core\StreamWrapper\PublicStream;
+use Drupal\simpletest\DrupalUnitTestBase;
+use Drupal\system\PhpStorage\MockPhpStorage;
+
+/**
+ * Tests the PHP storage factory.
+ *
+ * @see \Drupal\Core\PhpStorage\PhpStorageFactory
+ */
+class PhpStorageFactoryTest extends DrupalUnitTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'PHP storage factory tests',
+      'description' => 'Tests the PHP storage factory..',
+      'group' => 'PhpStorage',
+    );
+  }
+
+  /**
+   * Tests the get() method with no settings.
+   */
+  public function testGetNoSettings() {
+    $php = PhpStorageFactory::get('test');
+    // This should be the default class used.
+    $this->assertTrue($php instanceof MTimeProtectedFileStorage, 'An MTimeProtectedFileStorage instance was returned with no settings.');
+  }
+
+  /**
+   * Tests the get() method using the 'default' settings.
+   */
+  public function testGetDefault() {
+    $this->setSettings();
+    $php = PhpStorageFactory::get('test');
+    $this->assertTrue($php instanceof MockPhpStorage, 'A FileReadOnlyStorage instance was returned with default settings.');
+  }
+
+  /**
+   * Tests the get() method with overridden settings.
+   */
+  public function testGetOverride() {
+    $this->setSettings('test');
+    $php = PhpStorageFactory::get('test');
+    // The FileReadOnlyStorage should be used from settings.
+    $this->assertTrue($php instanceof MockPhpStorage, 'A MockPhpStorage instance was returned from overridden settings.');
+
+    // Test that the name is used for the bin when it is NULL.
+    $this->setSettings('test', array('bin' => NULL));
+    $php = PhpStorageFactory::get('test');
+    $this->assertTrue($php instanceof MockPhpStorage, 'An MockPhpStorage instance was returned from overridden settings.');
+    $this->assertIdentical('test', $php->getConfigurationValue('bin'), 'Name value was used for bin.');
+
+    // Test that a default directory is set if it's empty.
+    $this->setSettings('test', array('directory' => NULL));
+    $php = PhpStorageFactory::get('test');
+    $this->assertTrue($php instanceof MockPhpStorage, 'An MockPhpStorage instance was returned from overridden settings.');
+    $this->assertIdentical(DRUPAL_ROOT . '/' . PublicStream::basePath() . '/php', $php->getConfigurationValue('directory'), 'Default file directory was used.');
+
+    // Test that a default storage class is set if it's empty.
+    $this->setSettings('test', array('class' => NULL));
+    $php = PhpStorageFactory::get('test');
+    $this->assertTrue($php instanceof MTimeProtectedFileStorage, 'An MTimeProtectedFileStorage instance was returned from overridden settings with no class.');
+  }
+
+  /**
+   * Sets the Settings() singleton.
+   *
+   * @param string $name
+   *   The storage bin name to set.
+   * @param array $configuration
+   *   An array of configuration to set. Will be merged with default values.
+   */
+  protected function setSettings($name = 'default', array $configuration = array()) {
+    $settings['php_storage'][$name] = $configuration + array(
+      'class' => 'Drupal\system\PhpStorage\MockPhpStorage',
+      'directory' => 'tmp://',
+      'secret' => $this->randomString(),
+      'bin' => 'test',
+    );
+    new Settings($settings);
+  }
+
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php
index 5689b3d..e33f79b 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php
@@ -8,7 +8,7 @@
 namespace Drupal\system\Tests\Theme;
 
 use Drupal\simpletest\WebTestBase;
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 
 /**
  * Tests Twig engine configuration via settings.php.
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php
index cb4c810..f90fede 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php
@@ -7,13 +7,37 @@
 
 namespace Drupal\Tests\Component\PhpStorage;
 
-use Drupal\Component\Utility\Settings;
+use Drupal\Component\PhpStorage\FileStorage;
+use Drupal\Component\PhpStorage\FileReadOnlyStorage;
 
 /**
  * Tests the simple file storage.
+ *
+ * @group Drupal
+ * @group PhpStorage
+ *
+ * @coversDefaultClass \Drupal\Component\PhpStorage\FileStorage
+ * @coversDefaultClass \Drupal\Component\PhpStorage\FileReadOnlyStorage
  */
 class FileStorageTest extends PhpStorageTestBase {
 
+  /**
+   * Standard test settings to pass to storage instances.
+   *
+   * @var array
+   */
+  protected $standardSettings;
+
+  /**
+   * Read only test settings to pass to storage instances.
+   *
+   * @var array
+   */
+  protected $readonlyStorage;
+
+  /**
+   * {@inheritdoc}
+   */
   public static function getInfo() {
     return array(
       'name' => 'Simple file storage',
@@ -22,20 +46,23 @@ public static function getInfo() {
     );
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function setUp() {
     parent::setUp();
+
     $dir_path = sys_get_temp_dir() . '/php';
-    $settings['php_storage']['simpletest'] = array(
-      'class' => 'Drupal\Component\PhpStorage\FileStorage',
+
+    $this->standardSettings = array(
       'directory' => $dir_path,
+      'bin' => 'test',
     );
-    $settings['php_storage']['readonly'] = array(
-      'class' => 'Drupal\Component\PhpStorage\FileReadOnlyStorage',
+    $this->readonlyStorage = array(
       'directory' => $dir_path,
       // Let this read from the bin where the other instance is writing.
-      'bin' => 'simpletest',
+      'bin' => 'test',
     );
-    new Settings($settings);
   }
 
   /**
@@ -45,8 +72,7 @@ public function setUp() {
    * @group PhpStorage
    */
   public function testCRUD() {
-    $php = $this->storageFactory->get('simpletest');
-    $this->assertInstanceOf('Drupal\Component\PhpStorage\FileStorage', $php);
+    $php = new FileStorage($this->standardSettings);
     $this->assertCRUD($php);
   }
 
@@ -57,7 +83,7 @@ public function testCRUD() {
    * @group PhpStorage
    */
   public function testReadOnly() {
-    $php = $this->storageFactory->get('simpletest');
+    $php = new FileStorage($this->standardSettings);
     $name = $this->randomName() . '/' . $this->randomName() . '.php';
 
     // Find a global that doesn't exist.
@@ -69,7 +95,7 @@ public function testReadOnly() {
     $code = "<?php\n\$GLOBALS[$random] = TRUE;";
     $success = $php->save($name, $code);
     $this->assertSame($success, TRUE);
-    $php_read = $this->storageFactory->get('readonly');
+    $php_read = new FileReadOnlyStorage($this->readonlyStorage);
     $php_read->load($name);
     $this->assertTrue($GLOBALS[$random]);
 
@@ -88,10 +114,10 @@ public function testReadOnly() {
    * @group PhpStorage
    */
   public function testWriteable() {
-    $php_read = $this->storageFactory->get('readonly');
+    $php_read = new FileReadOnlyStorage($this->readonlyStorage);
     $this->assertFalse($php_read->writeable());
 
-    $php = $this->storageFactory->get('simpletest');
+    $php = new FileStorage($this->standardSettings);
     $this->assertTrue($php->writeable());
   }
 
@@ -102,14 +128,14 @@ public function testWriteable() {
    * @group PhpStorage
    */
   public function testDeleteAll() {
-    $php_read = $this->storageFactory->get('readonly');
+    $php_read = new FileReadOnlyStorage($this->readonlyStorage);
     $this->assertFalse($php_read->deleteAll());
 
     // Make sure directory exists prior to removal.
     $this->assertTrue(file_exists(sys_get_temp_dir() . '/php/simpletest'), 'File storage directory does not exist.');
 
     // Write out some files.
-    $php = $this->storageFactory->get('simpletest');
+    $php = new FileStorage($this->standardSettings);
     $name = $this->randomName() . '/' . $this->randomName() . '.php';
 
     // Find a global that doesn't exist.
@@ -126,7 +152,7 @@ public function testDeleteAll() {
 
     $this->assertTrue($php->deleteAll());
     $this->assertFalse($php->load($name));
-    $this->assertFalse(file_exists(sys_get_temp_dir() . '/php/simpletest'), 'File storage directory still exists after call to deleteAll().');
+    $this->assertFalse(file_exists(sys_get_temp_dir() . '/php/test'), 'File storage directory still exists after call to deleteAll().');
 
     // Should still return TRUE if directory has already been deleted.
     $this->assertTrue($php->deleteAll());
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
index 062b857..055012f 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Tests\Component\PhpStorage;
 
-use Drupal\Component\Utility\Settings;
-
 /**
  * Base test class for MTime protected storage.
  */
@@ -29,26 +27,32 @@
   protected $secret;
 
   /**
+   * Test settings to pass to storage instances.
+   *
+   * @var array
+   */
+  protected $settings;
+
+  /**
    * {@inheritdoc}
    */
   public function setUp() {
     parent::setUp();
 
     $this->secret = $this->randomName();
-    $settings['php_storage']['simpletest'] = array(
-      'class' => $this->storageClass,
+
+    $this->settings = array(
       'directory' => sys_get_temp_dir() . '/php',
+      'bin' => 'test',
       'secret' => $this->secret,
     );
-    new Settings($settings);
   }
 
   /**
    * Tests basic load/save/delete operations.
    */
   public function testCRUD() {
-    $php = $this->storageFactory->get('simpletest');
-    $this->assertSame(get_class($php), $this->storageClass);
+    $php = new $this->storageClass($this->settings);
     $this->assertCRUD($php);
   }
 
@@ -62,10 +66,10 @@ public function testCRUD() {
    * @medium
    */
   public function testSecurity() {
-    $php = $this->storageFactory->get('simpletest');
+    $php = new $this->storageClass($this->settings);
     $name = 'simpletest.php';
     $php->save($name, '<?php');
-    $expected_root_directory = sys_get_temp_dir() . '/php/simpletest';
+    $expected_root_directory = sys_get_temp_dir() . '/php/test';
     $expected_directory = $expected_root_directory . '/' . $name;
     $directory_mtime = filemtime($expected_directory);
     $expected_filename = $expected_directory . '/' . hash_hmac('sha256', $name, $this->secret . $directory_mtime) . '.php';
@@ -87,7 +91,7 @@ public function testSecurity() {
     // a second of the initial save().
     sleep(1);
     for ($i = 0; $i < 2; $i++) {
-      $php = $this->storageFactory->get('simpletest');
+      $php = new $this->storageClass($this->settings);
       $GLOBALS['hacked'] = FALSE;
       $untrusted_code = "<?php\n" . '$GLOBALS["hacked"] = TRUE;';
       chmod($expected_directory, 0700);
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php
index 8fd6269..d5711f4 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php
@@ -8,7 +8,7 @@
 namespace Drupal\Tests\Component\PhpStorage;
 
 use Drupal\Tests\UnitTestCase;
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 
 /**
  * Base test for PHP storage controllers.
@@ -16,22 +16,6 @@
 abstract class PhpStorageTestBase extends UnitTestCase {
 
   /**
-   * The storage factory object.
-   *
-   * @var \Drupal\Component\PhpStorage\PhpStorageFactory
-   */
-  protected $storageFactory;
-
-  /**
-   * {@inheritdoc}
-   */
-  function setUp() {
-    parent::setUp();
-
-    $this->storageFactory = new PhpStorageFactory();
-  }
-
-  /**
    * Assert that a PHP storage controller's load/save/delete operations work.
    */
   public function assertCRUD($php) {
diff --git a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
index 7883007..431499b 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Tests\Component\Plugin;
 
-use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Tests\UnitTestCase;
 
 /**
