diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index 9fdc7c5..1089aa8 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -144,6 +144,15 @@ protected $originalSettings; /** + * The public file directory for the test environment. + * + * This is set in TestBase::prepareEnvironment(). + * + * @var string + */ + protected $public_files_directory; + + /** * TRUE if die on fail enabled. * * @var boolean diff --git a/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelTest.php b/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelTest.php index cc84777..9e869ee 100644 --- a/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelTest.php @@ -32,7 +32,7 @@ function setUp() { $conf['php_storage']['service_container']= array( 'bin' => 'service_container', 'class' => 'Drupal\Component\PhpStorage\MTimeProtectedFileStorage', - 'directory' => DRUPAL_ROOT . '/' . config('system.file')->get('path.public') . '/php', + 'directory' => DRUPAL_ROOT . '/' . $this->public_files_directory . '/php', 'secret' => $GLOBALS['drupal_hash_salt'], ); // Use a non-persistent cache to avoid queries to non-existing tables.