commit 4b22992487ff53c4475e9cbe1970917859f70334 Author: sun Date: Tue Feb 25 02:53:53 2014 +0100 Split out FilesystemIterator flags onto separate lines. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php index f8c279f..a1f253e 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php @@ -115,8 +115,10 @@ public function deleteAll() { protected function getIterator($prefix = '') { // GlobIterator requires absolute paths on Windows, so we use a filtered // FilesystemIterator instead. - $flags = \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO; - $flags |= \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS; + $flags = \FilesystemIterator::KEY_AS_PATHNAME; + $flags |= \FilesystemIterator::CURRENT_AS_FILEINFO; + $flags |= \FilesystemIterator::SKIP_DOTS; + $flags |= \FilesystemIterator::UNIX_PATHS; $iterator = new \FilesystemIterator($this->path, $flags); $filter = new FileStorageFilterIterator($iterator, $this->format->getFileExtension(), $prefix); return $filter; commit fda44263bc6d03a7dc5488d7ef7caf514748d3d2 Author: sun Date: Tue Feb 25 03:01:09 2014 +0100 Fixed SplFileInfo::getExtension() is not consistently available on PHP 5.3. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php b/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php index 0f4a12b..76e5278 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php @@ -38,7 +38,7 @@ class FileStorageFilterIterator extends \FilterIterator { */ public function __construct(\FilesystemIterator $iterator, $extension, $prefix = '') { parent::__construct($iterator); - $this->extension = $extension; + $this->extension = '.' . $extension; $this->prefix = $prefix; } @@ -50,7 +50,7 @@ public function accept() { if (!$file->isFile()) { return FALSE; } - if ($file->getExtension() != $this->extension) { + if (substr($file->getFilename(), -strlen($this->extension) !== $this->extension)) { return FALSE; } if ($this->prefix !== '' && strpos($file->getFilename(), $this->prefix) !== 0) { commit 70caf10be06c06bf3798700aebb9f86fea156fe1 Author: sun Date: Tue Feb 25 03:13:46 2014 +0100 Prevent empty path from throwing UnexpectedValueException. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php index a1f253e..2cfc7a4 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php @@ -113,6 +113,9 @@ public function deleteAll() { * The filesystem iterator. */ protected function getIterator($prefix = '') { + if (empty($this->path)) { + return array(); + } // GlobIterator requires absolute paths on Windows, so we use a filtered // FilesystemIterator instead. $flags = \FilesystemIterator::KEY_AS_PATHNAME; commit 0b617140421ec58d5c89e816ca5d4d0803e5a562 Author: sun Date: Tue Feb 25 03:20:19 2014 +0100 Check whether path exists before trying to iterate. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php index 2cfc7a4..3cab77b 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php @@ -113,7 +113,7 @@ public function deleteAll() { * The filesystem iterator. */ protected function getIterator($prefix = '') { - if (empty($this->path)) { + if (!is_dir($this->path)) { return array(); } // GlobIterator requires absolute paths on Windows, so we use a filtered commit fef3cb27a993abdc12f87328a8cf37d7fd62049c Author: sun Date: Tue Feb 25 04:31:55 2014 +0100 Catch any kind of FilesystemIterator exception. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php index 3cab77b..ea103bc 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php @@ -113,17 +113,19 @@ public function deleteAll() { * The filesystem iterator. */ protected function getIterator($prefix = '') { - if (!is_dir($this->path)) { - return array(); - } // GlobIterator requires absolute paths on Windows, so we use a filtered // FilesystemIterator instead. - $flags = \FilesystemIterator::KEY_AS_PATHNAME; - $flags |= \FilesystemIterator::CURRENT_AS_FILEINFO; - $flags |= \FilesystemIterator::SKIP_DOTS; - $flags |= \FilesystemIterator::UNIX_PATHS; - $iterator = new \FilesystemIterator($this->path, $flags); - $filter = new FileStorageFilterIterator($iterator, $this->format->getFileExtension(), $prefix); + try { + $flags = \FilesystemIterator::KEY_AS_PATHNAME; + $flags |= \FilesystemIterator::CURRENT_AS_FILEINFO; + $flags |= \FilesystemIterator::SKIP_DOTS; + $flags |= \FilesystemIterator::UNIX_PATHS; + $iterator = new \FilesystemIterator($this->path, $flags); + $filter = new FileStorageFilterIterator($iterator, $this->format->getFileExtension(), $prefix); + } + catch (\Exception $e) { + $filter = array(); + } return $filter; } diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php b/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php index 76e5278..3e1ed2b 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php @@ -29,14 +29,14 @@ class FileStorageFilterIterator extends \FilterIterator { /** * Constructs this filter. * - * @param \FilesystemIterator $iterator + * @param \Iterator $iterator * The filesystem iterator to filter. * @param string $extension * The file extension to accept. * @param string $prefix * (optional) A filename prefix to filter by. */ - public function __construct(\FilesystemIterator $iterator, $extension, $prefix = '') { + public function __construct(\Iterator $iterator, $extension, $prefix = '') { parent::__construct($iterator); $this->extension = '.' . $extension; $this->prefix = $prefix; commit f002bfa8468eaa38a430a99eddf164043ece530b Author: sun Date: Wed Feb 26 21:31:34 2014 +0100 Reverting debugging code. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php index ea103bc..351027c 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php @@ -109,8 +109,8 @@ public function deleteAll() { /** * Returns an iterator for the file storage. * - * @return \FilesystemIterator - * The filesystem iterator. + * @return \FilesystemIterator|array + * The filesystem iterator, or an empty array if the path is not accessible. */ protected function getIterator($prefix = '') { // GlobIterator requires absolute paths on Windows, so we use a filtered diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php b/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php index 3e1ed2b..0f4a12b 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorageFilterIterator.php @@ -29,16 +29,16 @@ class FileStorageFilterIterator extends \FilterIterator { /** * Constructs this filter. * - * @param \Iterator $iterator + * @param \FilesystemIterator $iterator * The filesystem iterator to filter. * @param string $extension * The file extension to accept. * @param string $prefix * (optional) A filename prefix to filter by. */ - public function __construct(\Iterator $iterator, $extension, $prefix = '') { + public function __construct(\FilesystemIterator $iterator, $extension, $prefix = '') { parent::__construct($iterator); - $this->extension = '.' . $extension; + $this->extension = $extension; $this->prefix = $prefix; } @@ -50,7 +50,7 @@ public function accept() { if (!$file->isFile()) { return FALSE; } - if (substr($file->getFilename(), -strlen($this->extension) !== $this->extension)) { + if ($file->getExtension() != $this->extension) { return FALSE; } if ($this->prefix !== '' && strpos($file->getFilename(), $this->prefix) !== 0) { commit 8af9c9707d30d5748babf3446100a989d1d8c310 Author: sun Date: Wed Feb 26 21:56:57 2014 +0100 Sort modules + themes alphabetically. diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index 882de29..eaddd78 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -114,8 +114,11 @@ protected function getAllFolders() { if (!isset($this->folders)) { $profile = drupal_get_profile(); $this->folders = array($profile => drupal_get_path('profile', $profile)); - $folders = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules'); - $folders += drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info\.yml$/', 'themes'); + $modules = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules'); + ksort($modules); + $themes = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info\.yml$/', 'themes'); + ksort($themes); + $folders = $modules + $themes; $this->folders += array_map(function ($file) { return dirname($file->uri); }, $folders); commit 710de18d9a0b204923dd411ca643a3d7b8ae9798 Author: sun Date: Wed Feb 26 23:13:31 2014 +0100 Sort config files in InstallStorage. diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index eaddd78..5e89c35 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -26,13 +26,20 @@ class InstallStorage extends FileStorage { /** - * Folder map indexed by configuration name. + * Configuration directories keyed by provider. * * @var array */ protected $folders; /** + * Configuration files. + * + * @var \AppendIterator + */ + protected $iterator; + + /** * The subdirectory name to scan in each extension directory. * * This does not include the collection. @@ -94,15 +101,25 @@ protected function getPathname($key) { * Overrides \Drupal\Core\KeyValueStore\FileStorage::getIterator(). */ protected function getIterator($prefix = '') { - $iterator = new \AppendIterator(); - foreach ($this->getAllFolders() as $extension_path) { - $path = DRUPAL_ROOT . '/' . $extension_path . '/' . $this->subpath; - if (is_dir($path)) { - $git = new \GlobIterator("$path/$prefix*." . $this->format->getFileExtension()); - $iterator->append($git); + if (!isset($this->iterator)) { + $this->iterator = new \AppendIterator(); + foreach ($this->getAllFolders() as $extension_path) { + $path = DRUPAL_ROOT . '/' . $extension_path . '/' . $this->subpath; + if (is_dir($path)) { + $glob = new \GlobIterator("$path/$prefix*." . $this->format->getFileExtension()); + // All config files have to sorted alphabetically, which is not + // necessarily guaranteed on all platforms. + // @todo Move into ConfigInstaller. + $files = array(); + foreach ($glob as $file) { + $files[$file->getFilename()] = $file; + } + ksort($files); + $this->iterator->append(new \ArrayIterator($files)); + } } } - return $iterator; + return $this->iterator; } /** @@ -115,9 +132,7 @@ protected function getAllFolders() { $profile = drupal_get_profile(); $this->folders = array($profile => drupal_get_path('profile', $profile)); $modules = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules'); - ksort($modules); $themes = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info\.yml$/', 'themes'); - ksort($themes); $folders = $modules + $themes; $this->folders += array_map(function ($file) { return dirname($file->uri); commit c1eeeedcc839e9945b33dbb841fe898cca7cffc7 Author: sun Date: Sun Mar 2 04:57:16 2014 +0100 Make ConfigInstaller alphabetically sort default config to meet current expectations. diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php index abd52b5..98fbff7 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -77,6 +77,11 @@ public function installDefaultConfig($type, $name) { $source_storage = new ExtensionInstallStorage($this->activeStorage); $config_to_install = $source_storage->listAll($name . '.'); + // Sort all configuration names to install alphabetically. + // @todo Implement proper dependency resolution. + // @see https://drupal.org/node/2080823 + sort($config_to_install); + // Work out if this extension provides default configuration for any other // enabled extensions. $config_dir = drupal_get_path($type, $name) . '/config'; diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index 5e89c35..2525599 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -107,15 +107,7 @@ protected function getIterator($prefix = '') { $path = DRUPAL_ROOT . '/' . $extension_path . '/' . $this->subpath; if (is_dir($path)) { $glob = new \GlobIterator("$path/$prefix*." . $this->format->getFileExtension()); - // All config files have to sorted alphabetically, which is not - // necessarily guaranteed on all platforms. - // @todo Move into ConfigInstaller. - $files = array(); - foreach ($glob as $file) { - $files[$file->getFilename()] = $file; - } - ksort($files); - $this->iterator->append(new \ArrayIterator($files)); + $this->iterator->append($glob); } } } @@ -131,9 +123,8 @@ protected function getAllFolders() { if (!isset($this->folders)) { $profile = drupal_get_profile(); $this->folders = array($profile => drupal_get_path('profile', $profile)); - $modules = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules'); - $themes = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info\.yml$/', 'themes'); - $folders = $modules + $themes; + $folders = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules'); + $folders += drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info\.yml$/', 'themes'); $this->folders += array_map(function ($file) { return dirname($file->uri); }, $folders); commit 3bbd2ac18fb3ce5f7e3ffef52a9111a0a5d33066 Merge: c1eeeed f0f543f Author: sun Date: Sun Mar 2 05:03:46 2014 +0100 Merge branch '8.x' into kv-file-2190723-sun Conflicts: core/lib/Drupal/Core/Config/InstallStorage.php core/modules/config/tests/config_test/lib/Drupal/config_test/TestInstallStorage.php core/modules/config/tests/config_test/lib/Drupal/config_test/TestSchemaStorage.php commit 4d282ef846f22ceaf650966a20bf0ed01440c466 Author: sun Date: Sun Mar 2 05:44:23 2014 +0100 Fixed InstallStorage::getIterator() cannot be property-cached, since results depend on $prefix. diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index 0c9dad2..7274124 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -34,13 +34,6 @@ class InstallStorage extends FileStorage { protected $folders; /** - * Configuration files. - * - * @var \AppendIterator - */ - protected $iterator; - - /** * The subdirectory name to scan in each extension directory. * * This does not include the collection. @@ -102,17 +95,15 @@ protected function getPathname($key) { * Overrides \Drupal\Core\KeyValueStore\FileStorage::getIterator(). */ protected function getIterator($prefix = '') { - if (!isset($this->iterator)) { - $this->iterator = new \AppendIterator(); - foreach ($this->getAllFolders() as $extension_path) { - $path = DRUPAL_ROOT . '/' . $extension_path . '/' . $this->subpath; - if (is_dir($path)) { - $glob = new \GlobIterator("$path/$prefix*." . $this->format->getFileExtension()); - $this->iterator->append($glob); - } + $iterator = new \AppendIterator(); + foreach ($this->getAllFolders() as $extension_path) { + $path = DRUPAL_ROOT . '/' . $extension_path . '/' . $this->subpath; + if (is_dir($path)) { + $glob = new \GlobIterator("$path/$prefix*." . $this->format->getFileExtension()); + $iterator->append($glob); } } - return $this->iterator; + return $iterator; } /** commit 0efa09d8eb959027458e8f1f34911cca3bd4c5bf Author: sun Date: Sun Mar 2 05:54:48 2014 +0100 Temporarily use a GlobIterator. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php index 351027c..e39cdf2 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php @@ -113,6 +113,12 @@ public function deleteAll() { * The filesystem iterator, or an empty array if the path is not accessible. */ protected function getIterator($prefix = '') { + $path = realpath($this->path); + if ($path === FALSE) { + return array(); + } + return new \GlobIterator($path . '/' . $prefix . '*.' . $this->format->getFileExtension()); + // GlobIterator requires absolute paths on Windows, so we use a filtered // FilesystemIterator instead. try { commit 6e7625eb31eee1795d9aeafc62b7a3fe41759490 Author: sun Date: Sun Mar 2 07:12:05 2014 +0100 Updated ModuleTestBase. diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php index b644c19..3956a05 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php @@ -9,6 +9,7 @@ use Drupal\Core\Database\Database; use Drupal\Core\Config\FileStorage; +use Drupal\Core\Serialization\Yaml; use Drupal\simpletest\WebTestBase; /** @@ -99,7 +100,7 @@ function assertModuleConfig($module) { if (!is_dir($module_config_dir)) { return; } - $module_file_storage = new FileStorage($module_config_dir); + $module_file_storage = new FileStorage('', new Yaml(), $module_config_dir); // Verify that the module's default config directory is not empty and // contains default configuration files (instead of something else). commit b07c59becbfce4a5862f4093e78444eeed21f715 Author: sun Date: Sun Mar 2 07:26:16 2014 +0100 Fixed update.php tests. diff --git a/core/lib/Drupal/Core/DependencyInjection/UpdateServiceProvider.php b/core/lib/Drupal/Core/DependencyInjection/UpdateServiceProvider.php index 4776214..7bd369d 100644 --- a/core/lib/Drupal/Core/DependencyInjection/UpdateServiceProvider.php +++ b/core/lib/Drupal/Core/DependencyInjection/UpdateServiceProvider.php @@ -30,9 +30,8 @@ public function register(ContainerBuilder $container) { // Prevent config from accessing {cache_config}. // @see $conf['cache_classes'], update_prepare_d8_bootstrap() - $container - ->register('config.storage', 'Drupal\Core\Config\FileStorage') - ->addArgument(config_get_config_directory(CONFIG_ACTIVE_DIRECTORY)); + $container->setAlias('config.storage', 'config.storage.active'); + $container->register('module_handler', 'Drupal\Core\Extension\UpdateModuleHandler') ->addArgument('%container.modules%'); $container commit 0c264253ea57a08674cd6de9356705f27ebc0579 Author: sun Date: Sun Mar 2 07:54:13 2014 +0100 Fixed Locale tests. diff --git a/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php b/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php index 353fcc6..73d5970 100644 --- a/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php +++ b/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php @@ -9,6 +9,7 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Language\Language; +use Drupal\Core\Config\FileStorageFactory; use Drupal\Core\Config\TypedConfigManager; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Config\ConfigFactoryInterface; @@ -165,9 +166,10 @@ public function getComponentNames(array $components) { if ($components) { $names = array(); foreach ($components as $type => $list) { - // InstallStorage::getComponentNames returns a list of folders keyed by - // config name. - $names = array_merge($names, array_keys($this->installStorage->getComponentNames($type, $list))); + foreach ($list as $extension) { + $storage = FileStorageFactory::getExtension(drupal_get_path($type, $extension) . '/config'); + $names = array_merge($names, $storage->listAll()); + } } return $names; } commit 97e2aae474598521a702a64a160b0665721a1683 Author: sun Date: Sun Mar 2 08:11:37 2014 +0100 Fixed FileStorageTest. diff --git a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php index e39cdf2..6e69942 100644 --- a/core/lib/Drupal/Core/KeyValueStore/FileStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/FileStorage.php @@ -72,7 +72,11 @@ public function getAll() { * {@inheritdoc} */ public function set($key, $value) { + // @todo Use ErrorExceptions. + // @see https://drupal.org/node/1247666 + set_error_handler(array(__CLASS__, 'errorHandler')); file_put_contents($this->getPathname($key), $this->format->encode($value)); + restore_error_handler(); } /** @@ -107,6 +111,15 @@ public function deleteAll() { } /** + * Temporary error handler for YamlPecl::decode(). + */ + public static function errorHandler($severity, $message, $file, $line) { + restore_error_handler(); + // @todo Use a proper KeyValueStoreIOException. + throw new \RuntimeException($message, $severity); + } + + /** * Returns an iterator for the file storage. * * @return \FilesystemIterator|array @@ -126,6 +139,7 @@ protected function getIterator($prefix = '') { $flags |= \FilesystemIterator::CURRENT_AS_FILEINFO; $flags |= \FilesystemIterator::SKIP_DOTS; $flags |= \FilesystemIterator::UNIX_PATHS; + $flags |= \FilesystemIterator::FOLLOW_SYMLINKS; $iterator = new \FilesystemIterator($this->path, $flags); $filter = new FileStorageFilterIterator($iterator, $this->format->getFileExtension(), $prefix); } diff --git a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php index 8ed254a..0370584 100644 --- a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php +++ b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php @@ -117,26 +117,6 @@ function testCRUD() { $this->pass($class . ' thrown upon writing to a non-existing storage bin.'); } - // Deleting from a non-existing storage bin throws an exception. - try { - $this->invalidStorage->delete($name); - $this->fail('Exception not thrown upon deleting from a non-existing storage bin.'); - } - catch (\Exception $e) { - $class = get_class($e); - $this->pass($class . ' thrown upon deleting from a non-existing storage bin.'); - } - - // Listing on a non-existing storage bin throws an exception. - try { - $this->invalidStorage->listAll(); - $this->fail('Exception not thrown upon listing from a non-existing storage bin.'); - } - catch (\Exception $e) { - $class = get_class($e); - $this->pass($class . ' thrown upon listing from a non-existing storage bin.'); - } - // Test renaming an object that does not exist throws an exception. try { $this->storage->rename('config_test.storage_does_not_exist', 'config_test.storage_does_not_exist_rename');