Update to Drupal 8.1.9. For more information, see https://www.drupal.org/project/drupal/releases/8.1.9
This commit is contained in:
parent
f9f23cdf38
commit
09b113657a
125 changed files with 2307 additions and 385 deletions
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\KernelTests\Core\Config\Storage;
|
||||
|
||||
use Drupal\config\StorageReplaceDataWrapper;
|
||||
use Drupal\Core\Config\StorageInterface;
|
||||
|
||||
/**
|
||||
* Tests StorageReplaceDataWrapper operations.
|
||||
*
|
||||
* @group config
|
||||
*/
|
||||
class StorageReplaceDataWrapperTest extends ConfigStorageTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->storage = new StorageReplaceDataWrapper($this->container->get('config.storage'));
|
||||
// ::listAll() verifications require other configuration data to exist.
|
||||
$this->storage->write('system.performance', array());
|
||||
$this->storage->replaceData('system.performance', array('foo' => 'bar'));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function read($name) {
|
||||
return $this->storage->read($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function insert($name, $data) {
|
||||
$this->storage->write($name, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function update($name, $data) {
|
||||
$this->storage->write($name, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function delete($name) {
|
||||
$this->storage->delete($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function testInvalidStorage() {
|
||||
// No-op as this test does not make sense.
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if new collections created correctly.
|
||||
*
|
||||
* @param string $collection
|
||||
* The collection name.
|
||||
*
|
||||
* @dataProvider providerCollections
|
||||
*/
|
||||
public function testCreateCollection($collection) {
|
||||
$initial_collection_name = $this->storage->getCollectionName();
|
||||
|
||||
// Create new storage with given collection and check it is set correctly.
|
||||
$new_storage = $this->storage->createCollection($collection);
|
||||
$this->assertSame($collection, $new_storage->getCollectionName());
|
||||
|
||||
// Check collection not changed in the current storage instance.
|
||||
$this->assertSame($initial_collection_name, $this->storage->getCollectionName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for testing different collections.
|
||||
*
|
||||
* @return array
|
||||
* Returns an array of collection names.
|
||||
*/
|
||||
public function providerCollections() {
|
||||
return [
|
||||
[StorageInterface::DEFAULT_COLLECTION],
|
||||
['foo.bar'],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
|
@ -62,9 +62,9 @@ class StableTemplateOverrideTest extends KernelTestBase {
|
|||
// Enable all core modules.
|
||||
$all_modules = system_rebuild_module_data();
|
||||
$all_modules = array_filter($all_modules, function ($module) {
|
||||
// Filter contrib, hidden, already enabled modules and modules in the
|
||||
// Testing package.
|
||||
if ($module->origin !== 'core' || !empty($module->info['hidden']) || $module->status == TRUE || $module->info['package'] == 'Testing') {
|
||||
// Filter contrib, hidden, experimental, already enabled modules, and
|
||||
// modules in the Testing package.
|
||||
if ($module->origin !== 'core' || !empty($module->info['hidden']) || $module->status == TRUE || $module->info['package'] == 'Testing' || $module->info['package'] == 'Core (Experimental)') {
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
Reference in a new issue