diff core/modules/config/tests/src/Functional/ConfigInstallWebTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
line wrap: on
line diff
--- a/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php	Thu May 09 15:34:47 2019 +0100
@@ -4,6 +4,7 @@
 
 use Drupal\Core\Config\PreExistingConfigException;
 use Drupal\Core\Config\StorageInterface;
+use Drupal\Core\File\Exception\FileException;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\Tests\BrowserTestBase;
 
@@ -190,7 +191,7 @@
     $this->drupalPostForm('admin/modules', ['modules[config_other_module_config_test][enable]' => TRUE], t('Install'));
     $this->drupalPostForm('admin/modules', ['modules[config_install_dependency_test][enable]' => TRUE], t('Install'));
     $this->rebuildContainer();
-    $this->assertTrue(entity_load('config_test', 'other_module_test_with_dependency'), 'The config_test.dynamic.other_module_test_with_dependency configuration has been created during install.');
+    $this->assertTrue(\Drupal::entityTypeManager()->getStorage('config_test')->load('other_module_test_with_dependency'), 'The config_test.dynamic.other_module_test_with_dependency configuration has been created during install.');
   }
 
   /**
@@ -201,7 +202,12 @@
     $this->drupalPostForm('admin/modules', ['modules[config][enable]' => TRUE], t('Install'));
 
     $directory = config_get_config_directory(CONFIG_SYNC_DIRECTORY);
-    file_unmanaged_delete_recursive($directory);
+    try {
+      \Drupal::service('file_system')->deleteRecursive($directory);
+    }
+    catch (FileException $e) {
+      // Ignore failed deletes.
+    }
     $this->drupalGet('/admin/reports/status');
     $this->assertRaw(t('The directory %directory does not exist.', ['%directory' => $directory]));
   }