diff --git a/core/modules/config/lib/Drupal/config/Tests/Storage/CachedStorageTest.php b/core/modules/config/lib/Drupal/config/Tests/Storage/CachedStorageTest.php index 196d8d0..cb00a1e 100644 --- a/core/modules/config/lib/Drupal/config/Tests/Storage/CachedStorageTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/Storage/CachedStorageTest.php @@ -58,13 +58,6 @@ public function testInvalidStorage() { /** * {@inheritdoc} */ - public function testInvalidData() { - // No-op as this test does not make sense. - } - - /** - * {@inheritdoc} - */ protected function read($name) { $data = $this->cache->get($name); // Cache misses fall through to the underlying storage. @@ -75,28 +68,16 @@ protected function read($name) { * {@inheritdoc} */ protected function insert($name, $data) { - // Try writing to the file storage first catch exceptions so that we can do - // the invalid data tests. - try { - $this->filestorage->write($name, $data); - $this->cache->set($name, $data); - } - catch (\Exception $e) { - } + $this->filestorage->write($name, $data); + $this->cache->set($name, $data); } /** * {@inheritdoc} */ protected function update($name, $data) { - // Try writing to the file storage first catch exceptions so that we can do - // the invalid data tests. - try { - $this->filestorage->write($name, $data); - $this->cache->set($name, $data); - } - catch (\Exception $e) { - } + $this->filestorage->write($name, $data); + $this->cache->set($name, $data); } /** 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 8996359..c112ccd 100644 --- a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php +++ b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php @@ -158,22 +158,6 @@ public function testInvalidStorage() { } /** - * Test that invalid data can not be read from the storage. - */ - public function testInvalidData() { - $name = 'config_test.storage'; - - // Reading a name containing non-decodeable data returns FALSE. - $this->insert($name, ''); - $data = $this->storage->read($name); - $this->assertIdentical($data, FALSE); - - $this->update($name, 'foo'); - $data = $this->storage->read($name); - $this->assertIdentical($data, FALSE); - } - - /** * Tests storage writing and reading data preserving data type. */ function testDataTypes() {