diff -u b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php --- b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php +++ b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php @@ -79,7 +79,7 @@ $this->assertEqual(count($errors), 1, t('Small images report an error.'), 'File'); // Maximum size. - if (Drupal::service('image.toolkit')) { + if ($this->container->has('image.toolkit')) { // Copy the image so that the original doesn't get resized. copy('core/misc/druplicon.png', 'temporary://druplicon.png'); $this->image->uri = 'temporary://druplicon.png';