Skip to content
Snippets Groups Projects
Commit 3e8324be authored by catch's avatar catch
Browse files

Issue #3497481 by longwave: Remove unused UnitTestCase::getConfigStorageStub()

parent 2ba2f9f3
No related branches found
No related tags found
Loading
Pipeline #391884 canceled
......@@ -138,32 +138,6 @@ public function getConfigFactoryStub(array $configs = []) {
return $config_factory;
}
/**
* Returns a stub config storage that returns the supplied configuration.
*
* @param array $configs
* An associative array of configuration settings whose keys are
* configuration object names and whose values are key => value arrays
* for the configuration object in question.
*
* @return \Drupal\Core\Config\StorageInterface
* A mocked config storage.
*/
public function getConfigStorageStub(array $configs) {
$config_storage = $this->createMock('Drupal\Core\Config\NullStorage');
$config_storage->expects($this->any())
->method('listAll')
->willReturn(array_keys($configs));
foreach ($configs as $name => $config) {
$config_storage->expects($this->any())
->method('read')
->with($this->equalTo($name))
->willReturn($config);
}
return $config_storage;
}
/**
* Returns a stub translation manager that just returns the passed string.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment