Unverified Commit 4ce4ae9f authored by larowlan's avatar larowlan Committed by alexpott

Issue #3152320 by bircher, nedjo, tstoeckler:...

Issue #3152320 by bircher, nedjo, tstoeckler: ExtensionInstallStorage::createCollection() produces error

(cherry picked from commit 6042b73e)
parent dae048d4
......@@ -65,7 +65,9 @@ public function createCollection($collection) {
return new static(
$this->configStorage,
$this->directory,
$collection
$collection,
$this->includeProfile,
$this->installProfile
);
}
......
<?php
namespace Drupal\Tests\Core\Config;
use Drupal\Core\Config\ExtensionInstallStorage;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\MemoryStorage;
use Drupal\Core\Config\StorageInterface;
use Drupal\Tests\UnitTestCase;
/**
* @coversDefaultClass \Drupal\Core\Config\ExtensionInstallStorage
* @group Config
*/
class ExtensionInstallStorageTest extends UnitTestCase {
/**
* @covers ::createCollection
*/
public function testCreateCollection() {
$memory = new MemoryStorage();
$include_profile = FALSE;
$profile = $this->randomMachineName();
$collectionName = $this->randomMachineName();
// Set up the storage.
$storage = new ExtensionInstallStorage($memory, InstallStorage::CONFIG_INSTALL_DIRECTORY, StorageInterface::DEFAULT_COLLECTION, $include_profile, $profile);
// Create a collection.
$collection = $storage->createCollection($collectionName);
static::assertEquals($collectionName, $collection->getCollectionName());
}
}
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