diff -u b/core/modules/system/tests/upgrade/drupal-7.system.database.php b/core/modules/system/tests/upgrade/drupal-7.system.database.php --- b/core/modules/system/tests/upgrade/drupal-7.system.database.php +++ b/core/modules/system/tests/upgrade/drupal-7.system.database.php @@ -119,10 +119,6 @@ 'name' => 'actions_max_stack', 'value' => 'i:42;', )) -->values(array( - 'name' => 'install_profile', - 'value' => 's:7:"minimal";', - )) ->execute(); db_update('variable') @@ -139,0 +136,4 @@ +db_update('variable') + ->fields(array('value' => 's:7:"minimal";')) + ->condition('name', 'install_profile') + ->execute(); only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/GetFilenameUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/GetFilenameUnitTest.php @@ -8,6 +8,7 @@ namespace Drupal\system\Tests\Bootstrap; use Drupal\simpletest\UnitTestBase; +use Symfony\Component\DependencyInjection\Reference; /** * Tests drupal_get_filename()'s availability. @@ -26,6 +27,17 @@ public static function getInfo() { * Tests that drupal_get_filename() works when the file is not in database. */ function testDrupalGetFilename() { + + // Setup a config factory without storage because drupal_get_profile() + // uses config. + drupal_container()->register('config.null_storage', 'Drupal\Core\Config\NullStorage'); + drupal_container()->register('config.factory', 'Drupal\Core\Config\ConfigFactory') + ->addArgument(new Reference('config.null_storage')) + ->addArgument(new Reference('event_dispatcher')); + + drupal_container()->register('event_dispatcher', 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher') + ->addArgument(new Reference('service_container')); + // Assert that the test is meaningful by making sure the keyvalue service // does not exist. $this->assertFalse(drupal_container()->has('keyvalue'), 'The container has no keyvalue service.');