$this->assertTrue($phpinstanceofMockPhpStorage,'An MockPhpStorage instance was returned from overridden settings.');
$this->assertIdentical(PublicStream::basePath().'/php',$php->getConfigurationValue('directory'),'Default file directory was used.');
$this->assertSame(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($phpinstanceofMTimeProtectedFileStorage,'An MTimeProtectedFileStorage instance was returned from overridden settings with no class.');
// Test that a default secret is not returned if it's set in the override.
$this->setSettings('test');
$php=PhpStorageFactory::get('test');
$this->assertNotEquals('mock hash salt',$php->getConfigurationValue('secret'),'The default secret is not used if a secret is set in the overridden settings.');
// Test that a default secret is set if it's empty.
$this->setSettings('test',array('secret'=>NULL));
$php=PhpStorageFactory::get('test');
$this->assertSame('mock hash salt',$php->getConfigurationValue('secret'),'The default secret is used if one is not set in the overridden settings.');