From 597de05038c84ec4ee4021f9fc17e4a65c233e5b Mon Sep 17 00:00:00 2001
From: sun <sun@unleashedmind.com>
Date: Wed, 6 Aug 2014 19:31:41 +0200
Subject: [PATCH] Issue #2314123 by sun: Fixed various tests.

---
 .../block/src/Tests/BlockConfigSchemaTest.php      |  2 +
 .../src/Tests/CKEditorPluginManagerTest.php        |  3 +-
 core/modules/ckeditor/src/Tests/CKEditorTest.php   |  3 +-
 .../Tests/CommentDefaultFormatterCacheTagsTest.php |  2 +-
 .../src/Tests/CommentStringIdEntitiesTest.php      |  2 +
 .../config/src/Tests/ConfigEntityUnitTest.php      |  3 +
 .../config/src/Tests/Storage/CachedStorageTest.php |  3 +-
 .../src/Tests/Storage/ConfigStorageTestBase.php    |  5 ++
 .../config/src/Tests/Storage/FileStorageTest.php   |  2 +-
 .../dblog/src/Tests/Views/ViewsIntegrationTest.php |  3 +-
 .../modules/editor/src/Tests/EditorManagerTest.php |  3 +-
 .../editor/src/Tests/QuickEditIntegrationTest.php  |  8 ++-
 .../modules/entity/src/Tests/EntityDisplayTest.php |  7 +--
 .../entity/src/Tests/EntityFormDisplayTest.php     |  6 +-
 .../field/src/Tests/Email/EmailItemTest.php        |  7 ---
 .../src/Tests/FieldImportDeleteUninstallTest.php   |  2 +-
 core/modules/file/src/Tests/ValidatorTest.php      | 11 ++++
 core/modules/hal/src/Tests/NormalizerTestBase.php  |  2 +-
 .../modules/node/src/Tests/NodeLastChangedTest.php |  2 +-
 .../quickedit/src/Tests/MetadataGeneratorTest.php  |  7 ++-
 core/modules/rdf/src/Tests/CrudTest.php            | 15 +++++
 .../rdf/src/Tests/Field/EmailFieldRdfaTest.php     |  2 +-
 .../Tests/Field/FieldRdfaDatatypeCallbackTest.php  |  6 +-
 .../rdf/src/Tests/Field/FieldRdfaTestBase.php      |  7 ++-
 .../system/src/Tests/Block/SystemMenuBlockTest.php |  2 +-
 .../system/src/Tests/Cache/ApcuBackendUnitTest.php |  9 +--
 .../Cache/GenericCacheBackendUnitTestBase.php      |  2 +-
 .../src/Tests/Database/SelectComplexTest.php       |  4 +-
 .../Tests/DrupalKernel/DrupalKernelSiteTest.php    |  2 +-
 .../src/Tests/Entity/ConfigEntityQueryTest.php     |  9 ++-
 .../Entity/EntityAccessControlHandlerTest.php      |  2 +-
 .../src/Tests/Entity/EntityBundleFieldTest.php     |  7 ---
 .../system/src/Tests/Entity/EntityCrudHookTest.php |  1 -
 .../system/src/Tests/Entity/EntityFieldTest.php    | 19 ++++++-
 .../src/Tests/Entity/EntityLanguageTestBase.php    |  7 +++
 .../system/src/Tests/Entity/EntityQueryTest.php    |  4 +-
 .../src/Tests/Entity/EntityValidationTest.php      | 15 +++++
 .../src/Tests/Entity/FieldSqlStorageTest.php       | 10 ++++
 .../src/Tests/Extension/ModuleHandlerTest.php      |  5 ++
 .../src/Tests/Extension/ThemeHandlerTest.php       |  2 +-
 .../system/src/Tests/File/NameMungingTest.php      | 16 ++++++
 .../system/src/Tests/File/ScanDirectoryTest.php    |  5 ++
 .../system/src/Tests/Form/FormCacheTest.php        | 15 +++++
 .../system/src/Tests/Path/PathUnitTestBase.php     |  5 ++
 .../modules/system/src/Tests/System/ScriptTest.php |  5 ++
 .../system/src/Tests/TypedData/TypedDataTest.php   |  4 +-
 .../text/src/Tests/Formatter/TextFormatterTest.php |  1 -
 .../text/src/Tests/Formatter/TextPlainUnitTest.php | 65 ++++++++++++++++++++++
 .../user/src/Tests/UserAccountFormFieldsTest.php   |  1 +
 .../src/Tests/Entity/RowEntityRenderersTest.php    |  2 +-
 .../src/Tests/Plugin/RelationshipJoinTestBase.php  |  5 ++
 .../views/src/Tests/Plugin/RowEntityTest.php       |  2 +-
 .../modules/views/src/Tests/ViewExecutableTest.php |  2 +-
 core/modules/views/src/Tests/ViewStorageTest.php   |  1 -
 .../src/Tests/Wizard/WizardPluginBaseUnitTest.php  |  4 +-
 55 files changed, 265 insertions(+), 81 deletions(-)

diff --git a/core/modules/block/src/Tests/BlockConfigSchemaTest.php b/core/modules/block/src/Tests/BlockConfigSchemaTest.php
index 2be1a6d..6cae8e1 100644
--- a/core/modules/block/src/Tests/BlockConfigSchemaTest.php
+++ b/core/modules/block/src/Tests/BlockConfigSchemaTest.php
@@ -32,6 +32,8 @@ class BlockConfigSchemaTest extends KernelTestBase {
     'forum',
     'node',
     'statistics',
+    // BlockManager->getModuleName() calls system_get_info().
+    'system',
     'taxonomy',
   );
 
diff --git a/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php b/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php
index f84f73e..3a5a070 100644
--- a/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php
+++ b/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php
@@ -22,7 +22,7 @@ class CKEditorPluginManagerTest extends DrupalUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('system', 'editor', 'ckeditor');
+  public static $modules = array('system', 'user', 'filter', 'editor', 'ckeditor');
 
   /**
    * The manager for "CKEditor plugin" plugins.
@@ -36,7 +36,6 @@ function setUp() {
 
     // Install the Filter module.
     $this->installSchema('system', 'url_alias');
-    $this->enableModules(array('user', 'filter'));
 
     // Create text format, associate CKEditor.
     $filtered_html_format = entity_create('filter_format', array(
diff --git a/core/modules/ckeditor/src/Tests/CKEditorTest.php b/core/modules/ckeditor/src/Tests/CKEditorTest.php
index 41b81b8..a80db68 100644
--- a/core/modules/ckeditor/src/Tests/CKEditorTest.php
+++ b/core/modules/ckeditor/src/Tests/CKEditorTest.php
@@ -23,7 +23,7 @@ class CKEditorTest extends DrupalUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('system', 'editor', 'ckeditor', 'filter_test');
+  public static $modules = array('system', 'user', 'filter', 'editor', 'ckeditor', 'filter_test');
 
   /**
    * An instance of the "CKEditor" text editor plugin.
@@ -44,7 +44,6 @@ function setUp() {
 
     // Install the Filter module.
     $this->installSchema('system', 'url_alias');
-    $this->enableModules(array('user', 'filter'));
 
     // Create text format, associate CKEditor.
     $filtered_html_format = entity_create('filter_format', array(
diff --git a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php
index 787631b..3c809c4 100644
--- a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php
+++ b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php
@@ -24,7 +24,7 @@ class CommentDefaultFormatterCacheTagsTest extends EntityUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('entity_test', 'comment', 'menu_link');
+  public static $modules = array('entity_test', 'comment');
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php b/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php
index a65aed0..b71b02f 100644
--- a/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php
+++ b/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php
@@ -29,6 +29,8 @@ class CommentStringIdEntitiesTest extends KernelTestBase {
     'field_ui',
     'entity',
     'entity_test',
+    // EMAIL_MAX_LENGTH constant.
+    'system',
     'text',
   );
 
diff --git a/core/modules/config/src/Tests/ConfigEntityUnitTest.php b/core/modules/config/src/Tests/ConfigEntityUnitTest.php
index 984583e..b9daa6c 100644
--- a/core/modules/config/src/Tests/ConfigEntityUnitTest.php
+++ b/core/modules/config/src/Tests/ConfigEntityUnitTest.php
@@ -71,6 +71,9 @@ public function testStorageMethods() {
 
     // Ensure that the configuration entity can be loaded by UUID.
     $entity_loaded_by_uuid = entity_load_by_uuid($entity_type->id(), $entity->uuid());
+    if (!$entity_loaded_by_uuid) {
+      $this->fail(sprintf("Failed to load '%s' entity ID '%s' by UUID '%s'.", $entity_type->id(), $entity->id(), $entity->uuid()));
+    }
     // Compare UUIDs as the objects are not identical since
     // $entity->enforceIsNew is FALSE and $entity_loaded_by_uuid->enforceIsNew
     // is NULL.
diff --git a/core/modules/config/src/Tests/Storage/CachedStorageTest.php b/core/modules/config/src/Tests/Storage/CachedStorageTest.php
index bd02b7d..72beb6a 100644
--- a/core/modules/config/src/Tests/Storage/CachedStorageTest.php
+++ b/core/modules/config/src/Tests/Storage/CachedStorageTest.php
@@ -11,6 +11,7 @@
 use Drupal\Core\Config\CachedStorage;
 use Drupal\Core\Database\Database;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
 
 /**
  * Tests CachedStorage operations.
@@ -89,7 +90,7 @@ public function containerBuild(ContainerBuilder $container) {
     parent::containerBuild($container);
     // Use the regular database cache backend to aid testing.
     $container->register('cache_factory', 'Drupal\Core\Cache\DatabaseBackendFactory')
-      ->addArgument(Database::getConnection());
+      ->addArgument(new Reference('database'));
   }
 
 }
diff --git a/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php b/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php
index 2bc48fa..e3c4e76 100644
--- a/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php
+++ b/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php
@@ -29,6 +29,11 @@
   protected $storage;
 
   /**
+   * @var \Drupal\Core\Config\StorageInterface;
+   */
+  protected $invalidStorage;
+
+  /**
    * Tests storage CRUD operations.
    *
    * @todo Coverage: Trigger PDOExceptions / Database exceptions.
diff --git a/core/modules/config/src/Tests/Storage/FileStorageTest.php b/core/modules/config/src/Tests/Storage/FileStorageTest.php
index 4aadad5..6165044 100644
--- a/core/modules/config/src/Tests/Storage/FileStorageTest.php
+++ b/core/modules/config/src/Tests/Storage/FileStorageTest.php
@@ -46,7 +46,7 @@ protected function delete($name) {
   /**
    * Tests the FileStorage::listAll method with a relative and absolute path.
    */
-  protected function testlistAll() {
+  public function testlistAll() {
     $expected_files = array(
       'core.extension',
       'system.performance',
diff --git a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php
index f771f3d..89f7cf0 100644
--- a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php
+++ b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php
@@ -32,7 +32,7 @@ class ViewsIntegrationTest extends ViewUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('dblog_test_views');
+  public static $modules = array('dblog', 'dblog_test_views');
 
   /**
    * {@inheritdoc}
@@ -40,7 +40,6 @@ class ViewsIntegrationTest extends ViewUnitTestBase {
   protected function setUp() {
     parent::setUp();
 
-    $this->enableModules(array('system', 'dblog'));
     $this->installSchema('dblog', array('watchdog'));
 
     ViewTestData::createTestViews(get_class($this), array('dblog_test_views'));
diff --git a/core/modules/editor/src/Tests/EditorManagerTest.php b/core/modules/editor/src/Tests/EditorManagerTest.php
index 55f37da..9e071d9 100644
--- a/core/modules/editor/src/Tests/EditorManagerTest.php
+++ b/core/modules/editor/src/Tests/EditorManagerTest.php
@@ -22,7 +22,7 @@ class EditorManagerTest extends DrupalUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('system', 'editor');
+  public static $modules = array('system', 'user', 'filter', 'editor');
 
   /**
    * The manager for text editor plugins.
@@ -36,7 +36,6 @@ public function setUp() {
 
     // Install the Filter module.
     $this->installSchema('system', 'url_alias');
-    $this->enableModules(array('user', 'filter'));
 
     // Add text formats.
     $filtered_html_format = entity_create('filter_format', array(
diff --git a/core/modules/editor/src/Tests/QuickEditIntegrationTest.php b/core/modules/editor/src/Tests/QuickEditIntegrationTest.php
index a8f81e2..73494f6 100644
--- a/core/modules/editor/src/Tests/QuickEditIntegrationTest.php
+++ b/core/modules/editor/src/Tests/QuickEditIntegrationTest.php
@@ -25,6 +25,11 @@
 class QuickEditIntegrationTest extends QuickEditTestBase {
 
   /**
+   * {@inheritdoc}
+   */
+  public static $modules = array('editor', 'editor_test');
+
+  /**
    * The manager for editor plug-ins.
    *
    * @var \Drupal\Component\Plugin\PluginManagerInterface
@@ -65,9 +70,6 @@ public function setUp() {
     // Install the Filter module.
     $this->installSchema('system', 'url_alias');
 
-    // Enable the Text Editor and Text Editor Test module.
-    $this->enableModules(array('editor', 'editor_test'));
-
     // Create a field.
     $this->field_name = 'field_textarea';
     $this->createFieldWithInstance(
diff --git a/core/modules/entity/src/Tests/EntityDisplayTest.php b/core/modules/entity/src/Tests/EntityDisplayTest.php
index 1e6d05d..1efa671 100644
--- a/core/modules/entity/src/Tests/EntityDisplayTest.php
+++ b/core/modules/entity/src/Tests/EntityDisplayTest.php
@@ -16,7 +16,7 @@
  */
 class EntityDisplayTest extends DrupalUnitTestBase {
 
-  public static $modules = array('entity', 'field', 'entity_test', 'user', 'text', 'entity_test');
+  public static $modules = array('entity', 'field', 'entity_test', 'user', 'text', 'field_test', 'node', 'system');
 
   protected function setUp() {
     parent::setUp();
@@ -137,8 +137,6 @@ public function testExtraFieldComponent() {
    * Tests the behavior of a field component within an entity display object.
    */
   public function testFieldComponent() {
-    $this->enableModules(array('field_test'));
-
     $field_name = 'test_field';
     // Create a field storage and an instance.
     $field_storage = entity_create('field_storage_config', array(
@@ -264,7 +262,6 @@ public function testBaseFieldComponent() {
    * Tests renaming and deleting a bundle.
    */
   public function testRenameDeleteBundle() {
-    $this->enableModules(array('field_test', 'node', 'system', 'text'));
     $this->installEntitySchema('node');
 
     // Create a node bundle, display and form display object.
@@ -314,8 +311,6 @@ public function testRenameDeleteBundle() {
    * Tests deleting field instance.
    */
   public function testDeleteFieldInstance() {
-    $this->enableModules(array('field_test'));
-
     $field_name = 'test_field';
     // Create a field storage and an instance.
     $field_storage = entity_create('field_storage_config', array(
diff --git a/core/modules/entity/src/Tests/EntityFormDisplayTest.php b/core/modules/entity/src/Tests/EntityFormDisplayTest.php
index ee7eb9d..eaaec9a 100644
--- a/core/modules/entity/src/Tests/EntityFormDisplayTest.php
+++ b/core/modules/entity/src/Tests/EntityFormDisplayTest.php
@@ -16,7 +16,7 @@
  */
 class EntityFormDisplayTest extends DrupalUnitTestBase {
 
-  public static $modules = array('entity', 'field', 'entity_test', 'user', 'text');
+  public static $modules = array('entity', 'field', 'entity_test', 'field_test', 'user', 'text');
 
   protected function setUp() {
     parent::setUp();
@@ -47,8 +47,6 @@ public function testEntityGetFromDisplay() {
    * Tests the behavior of a field component within an EntityFormDisplay object.
    */
   public function testFieldComponent() {
-    $this->enableModules(array('field_test'));
-
     // Create a field storage and an instance.
     $field_name = 'test_field';
     $field_storage = entity_create('field_storage_config', array(
@@ -177,8 +175,6 @@ public function testBaseFieldComponent() {
    * Tests deleting field instance.
    */
   public function testDeleteFieldInstance() {
-    $this->enableModules(array('field_sql_storage', 'field_test'));
-
     $field_name = 'test_field';
     // Create a field storage and an instance.
     $field_storage = entity_create('field_storage_config', array(
diff --git a/core/modules/field/src/Tests/Email/EmailItemTest.php b/core/modules/field/src/Tests/Email/EmailItemTest.php
index 20bb137..237749c 100644
--- a/core/modules/field/src/Tests/Email/EmailItemTest.php
+++ b/core/modules/field/src/Tests/Email/EmailItemTest.php
@@ -18,13 +18,6 @@
  */
 class EmailItemTest extends FieldUnitTestBase {
 
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('email');
-
   public function setUp() {
     parent::setUp();
 
diff --git a/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php b/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php
index c26d912..6584ec1 100644
--- a/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php
+++ b/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php
@@ -22,7 +22,7 @@ class FieldImportDeleteUninstallTest extends FieldUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('telephone', 'menu_link');
+  public static $modules = array('telephone');
 
   public function setUp() {
     parent::setUp();
diff --git a/core/modules/file/src/Tests/ValidatorTest.php b/core/modules/file/src/Tests/ValidatorTest.php
index 4f81f08..6176225 100644
--- a/core/modules/file/src/Tests/ValidatorTest.php
+++ b/core/modules/file/src/Tests/ValidatorTest.php
@@ -13,6 +13,17 @@
  * @group file
  */
 class ValidatorTest extends FileManagedUnitTestBase {
+
+  /**
+   * @var \Drupal\file\Entity\File
+   */
+  protected $image;
+
+  /**
+   * @var \Drupal\file\Entity\File
+   */
+  protected $non_image;
+
   function setUp() {
     parent::setUp();
 
diff --git a/core/modules/hal/src/Tests/NormalizerTestBase.php b/core/modules/hal/src/Tests/NormalizerTestBase.php
index 2ebff74..b5bb348 100644
--- a/core/modules/hal/src/Tests/NormalizerTestBase.php
+++ b/core/modules/hal/src/Tests/NormalizerTestBase.php
@@ -33,7 +33,7 @@
    *
    * @var array
    */
-  public static $modules = array('entity', 'entity_test', 'entity_reference', 'field', 'hal', 'language', 'rest', 'serialization', 'system', 'text', 'user', 'filter',  'menu_link');
+  public static $modules = array('entity', 'entity_test', 'entity_reference', 'field', 'hal', 'language', 'rest', 'serialization', 'system', 'text', 'user', 'filter');
 
   /**
    * The mock serializer.
diff --git a/core/modules/node/src/Tests/NodeLastChangedTest.php b/core/modules/node/src/Tests/NodeLastChangedTest.php
index 5160ad0..37d3bcc 100644
--- a/core/modules/node/src/Tests/NodeLastChangedTest.php
+++ b/core/modules/node/src/Tests/NodeLastChangedTest.php
@@ -21,7 +21,7 @@ class NodeLastChangedTest extends DrupalUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('entity', 'user', 'node', 'field', 'text', 'filter');
+  public static $modules = array('entity', 'user', 'node', 'field', 'system', 'text', 'filter');
 
   public function setUp() {
     parent::setUp();
diff --git a/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php b/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php
index f665071..bf1df14 100644
--- a/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php
+++ b/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php
@@ -21,6 +21,11 @@
 class MetadataGeneratorTest extends QuickEditTestBase {
 
   /**
+   * {@inheritdoc}
+   */
+  public static $modules = array('quickedit_test');
+
+  /**
    * The manager for editor plugins.
    *
    * @var \Drupal\Component\Plugin\PluginManagerInterface
@@ -124,8 +129,6 @@ public function testSimpleEntityType() {
   public function testEditorWithCustomMetadata() {
     $this->installSchema('system', 'url_alias');
 
-    // Enable edit_test module so that the WYSIWYG editor becomes available.
-    $this->enableModules(array('quickedit_test'));
     $this->editorManager = $this->container->get('plugin.manager.quickedit.editor');
     $this->editorSelector = new EditorSelector($this->editorManager, $this->container->get('plugin.manager.field.formatter'));
     $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager);
diff --git a/core/modules/rdf/src/Tests/CrudTest.php b/core/modules/rdf/src/Tests/CrudTest.php
index 772ec4f..e97a73c 100644
--- a/core/modules/rdf/src/Tests/CrudTest.php
+++ b/core/modules/rdf/src/Tests/CrudTest.php
@@ -23,6 +23,21 @@ class CrudTest extends DrupalUnitTestBase {
    */
   public static $modules = array('entity_test', 'rdf', 'system');
 
+  /**
+   * @var string
+   */
+  protected $prefix;
+
+  /**
+   * @var string
+   */
+  protected $entity_type;
+
+  /**
+   * @var string
+   */
+  protected $bundle;
+
   public function setUp() {
     parent::setUp();
     $this->prefix = 'rdf.mapping';
diff --git a/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php b/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php
index 7eb8d33..623a626 100644
--- a/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php
+++ b/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php
@@ -23,7 +23,7 @@ class EmailFieldRdfaTest extends FieldRdfaTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = array('email', 'text');
+  public static $modules = array('text');
 
   public function setUp() {
     parent::setUp();
diff --git a/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php b/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php
index 7dc6c74..6b4dc12 100644
--- a/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php
+++ b/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php
@@ -38,9 +38,9 @@ public function setUp() {
     ))->save();
 
     // Set up test values.
-    $this->test_value = $this->randomMachineName();
+    $this->testValue = $this->randomMachineName();
     $this->entity = entity_create('entity_test');
-    $this->entity->{$this->fieldName}->value = $this->test_value;
+    $this->entity->{$this->fieldName}->value = $this->testValue;
     $this->entity->save();
 
     $this->uri = $this->getAbsoluteUri($this->entity);
@@ -51,7 +51,7 @@ public function setUp() {
    */
   public function testDefaultFormatter() {
     // Expected value is the output of the datatype callback, not the raw value.
-    $this->assertFormatterRdfa(array('type'=>'text_default'), 'http://schema.org/interactionCount', array('value' => 'foo' . $this->test_value));
+    $this->assertFormatterRdfa(array('type'=>'text_default'), 'http://schema.org/interactionCount', array('value' => 'foo' . $this->testValue));
   }
 
 }
diff --git a/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php b/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php
index 9a26aca..e0502c7 100644
--- a/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php
+++ b/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php
@@ -50,7 +50,12 @@
    *
    * @var array
    */
-  public static $modules = array('rdf', 'menu_link');
+  public static $modules = array('rdf');
+
+  /**
+   * @var string
+   */
+  protected $testValue;
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php b/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php
index 95a4258..80c3d3d 100644
--- a/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php
+++ b/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php
@@ -24,7 +24,7 @@ class SystemMenuBlockTest extends DrupalUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('system', 'menu_link', 'block');
+  public static $modules = array('system', 'block');
 
   /**
    * Tests calculation of a system menu block's configuration dependencies.
diff --git a/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php b/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
index 134de2c..5174501 100644
--- a/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
+++ b/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
@@ -13,6 +13,7 @@
  * Tests the APCu cache backend.
  *
  * @group Cache
+ * @requires extension apc
  */
 class ApcuBackendUnitTest extends GenericCacheBackendUnitTestBase {
 
@@ -33,14 +34,14 @@ protected function checkRequirements() {
   }
 
   protected function createCacheBackend($bin) {
-    $this->backend = new ApcuBackend($bin, $this->databasePrefix);
-    return $this->backend;
+    return new ApcuBackend($bin, $this->databasePrefix);
   }
 
   public function tearDown() {
-    $this->backend->removeBin();
+    foreach ($this->cachebackends as $bin => $cachebackend) {
+      $this->cachebackends[$bin]->removeBin();
+    }
     parent::tearDown();
-    $this->backend = NULL;
   }
 
 }
diff --git a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
index a949b35..debff49 100644
--- a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
@@ -94,7 +94,7 @@ public function tearDownCacheBackend() {
    * @return \Drupal\Core\Cache\CacheBackendInterface
    *   Cache backend to test.
    */
-  final function getCacheBackend($bin = null) {
+  protected function getCacheBackend($bin = null) {
     if (!isset($bin)) {
       $bin = $this->getTestBin();
     }
diff --git a/core/modules/system/src/Tests/Database/SelectComplexTest.php b/core/modules/system/src/Tests/Database/SelectComplexTest.php
index 7932816..f63d84d 100644
--- a/core/modules/system/src/Tests/Database/SelectComplexTest.php
+++ b/core/modules/system/src/Tests/Database/SelectComplexTest.php
@@ -21,7 +21,7 @@ class SelectComplexTest extends DatabaseTestBase {
    *
    * @var array
    */
-  public static $modules = array('node_access_test', 'field');
+  public static $modules = array('system', 'user', 'node_access_test', 'field');
 
   /**
    * Tests simple JOIN statements.
@@ -322,9 +322,7 @@ function testJoinTwice() {
    * Tests that we can join on a query.
    */
   function testJoinSubquery() {
-    $this->enableModules(array('system'), FALSE);
     $this->installSchema('system', 'sequences');
-    $this->enableModules(array('field', 'user'));
 
     $account = entity_create('user', array(
       'name' => $this->randomMachineName(),
diff --git a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php
index 7e78d6b..1a719d2 100644
--- a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php
+++ b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php
@@ -39,7 +39,7 @@ class: Drupal\Core\Cache\MemoryBackendFactory
     file_put_contents($this->siteDirectory . '/services.yml', $doc);
 
     // Rebuild the container.
-    $this->kernel->rebuildContainer();
+    $this->container->get('kernel')->rebuildContainer();
 
     $this->assertTrue($this->container->has('site.service.yml'));
     $this->assertIdentical(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\MemoryBackendFactory');
diff --git a/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php b/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php
index 528c73b..6f39086 100644
--- a/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php
+++ b/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php
@@ -22,7 +22,7 @@ class ConfigEntityQueryTest extends DrupalUnitTestBase {
    *
    * @var array
    */
-  static $modules = array('config_test');
+  static $modules = array('entity', 'config_test');
 
   /**
    * Stores the search results for alter comparison.
@@ -49,7 +49,6 @@ protected function setUp() {
     parent::setUp();
 
     $this->entities = array();
-    $this->enableModules(array('entity'), TRUE);
     $this->factory = $this->container->get('entity.query');
 
     // These two are here to make sure that matchArray needs to go over several
@@ -346,7 +345,7 @@ public function testConfigEntityQuery() {
   /**
    * Tests count query.
    */
-  protected function testCount() {
+  public function testCount() {
     // Test count on no conditions.
     $count = $this->factory->get('config_query_test')
       ->count()
@@ -372,7 +371,7 @@ protected function testCount() {
   /**
    * Tests sorting and range on config entity queries.
    */
-  protected function testSortRange() {
+  public function testSortRange() {
     // Sort by simple ascending/descending.
     $this->queryResults = $this->factory->get('config_query_test')
       ->sort('number', 'DESC')
@@ -428,7 +427,7 @@ protected function testSortRange() {
   /**
    * Tests dotted path matching.
    */
-  protected function testDotted() {
+  public function testDotted() {
     $this->queryResults = $this->factory->get('config_query_test')
       ->condition('array.level1.*', 1)
       ->execute();
diff --git a/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php b/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php
index 8727cc6..52d5755 100644
--- a/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php
@@ -119,7 +119,7 @@ function testEntityTranslationAccess() {
   /**
    * Tests hook invocations.
    */
-  protected function testHooks() {
+  public function testHooks() {
     $state = $this->container->get('state');
     $entity = entity_create('entity_test', array(
       'name' => 'test',
diff --git a/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php b/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php
index 9b51d86..334ab58 100644
--- a/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php
@@ -29,13 +29,6 @@ class EntityBundleFieldTest extends EntityUnitTestBase  {
   protected $database;
 
   /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('menu_link');
-
-  /**
    * {@inheritdoc}
    */
   public function setUp() {
diff --git a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php
index 2f41f43..56bbd98 100644
--- a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php
@@ -135,7 +135,6 @@ public function testBlockHooks() {
    */
   public function testCommentHooks() {
     $account = $this->createUser();
-    $this->enableModules(array('entity', 'filter'));
     entity_create('node_type', array(
       'type' => 'article',
       'name' => 'Article',
diff --git a/core/modules/system/src/Tests/Entity/EntityFieldTest.php b/core/modules/system/src/Tests/Entity/EntityFieldTest.php
index 2371957..e83e442 100644
--- a/core/modules/system/src/Tests/Entity/EntityFieldTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityFieldTest.php
@@ -34,6 +34,21 @@ class EntityFieldTest extends EntityUnitTestBase  {
    */
   public static $modules = array('filter', 'text', 'node', 'user');
 
+  /**
+   * @var string
+   */
+  protected $entity_name;
+
+  /**
+   * @var \Drupal\user\Entity\User
+   */
+  protected $entity_user;
+
+  /**
+   * @var string
+   */
+  protected $entity_field_text;
+
   public function setUp() {
     parent::setUp();
 
@@ -230,9 +245,9 @@ protected function assertReadWrite($entity_type) {
 
     // Tests adding a value to a field item list.
     $entity->name[] = 'Another name';
-    $this->assertEqual($entity->name[1]->value == 'Another name', format_string('%entity_type: List item added via [].', array('%entity_type' => $entity_type)));
+    $this->assertEqual($entity->name[1]->value, 'Another name', format_string('%entity_type: List item added via [].', array('%entity_type' => $entity_type)));
     $entity->name[2]->value = 'Third name';
-    $this->assertEqual($entity->name[2]->value == 'Third name', format_string('%entity_type: List item added by a accessing not yet created item.', array('%entity_type' => $entity_type)));
+    $this->assertEqual($entity->name[2]->value, 'Third name', format_string('%entity_type: List item added by a accessing not yet created item.', array('%entity_type' => $entity_type)));
 
     // Test removing and empty-ing list items.
     $this->assertEqual(count($entity->name), 3, format_string('%entity_type: List has 3 items.', array('%entity_type' => $entity_type)));
diff --git a/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php b/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php
index 19cf1ad..ffc7830 100644
--- a/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php
+++ b/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php
@@ -37,6 +37,13 @@
   protected $field_name;
 
   /**
+   * Test field instances, keyed by entity type.
+   *
+   * @var array
+   */
+  protected $instance;
+
+  /**
    * The untranslatable test field name.
    *
    * @var string
diff --git a/core/modules/system/src/Tests/Entity/EntityQueryTest.php b/core/modules/system/src/Tests/Entity/EntityQueryTest.php
index 478068e..4d47e3f 100644
--- a/core/modules/system/src/Tests/Entity/EntityQueryTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityQueryTest.php
@@ -373,7 +373,7 @@ function testSort() {
   /**
    * Test tablesort().
    */
-  protected function testTableSort() {
+  public function testTableSort() {
     // While ordering on bundles do not give us a definite order, we can still
     // assert that all entities from one bundle are after the other as the
     // order dictates.
@@ -422,7 +422,7 @@ protected function testTableSort() {
   /**
    * Test that count queries are separated across entity types.
    */
-  protected function testCount() {
+  public function testCount() {
     // Create a field with the same name in a different entity type.
     $field_name = $this->figures;
     $field_storage = entity_create('field_storage_config', array(
diff --git a/core/modules/system/src/Tests/Entity/EntityValidationTest.php b/core/modules/system/src/Tests/Entity/EntityValidationTest.php
index ec858bd..1f87c74 100644
--- a/core/modules/system/src/Tests/Entity/EntityValidationTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityValidationTest.php
@@ -22,6 +22,21 @@ class EntityValidationTest extends EntityUnitTestBase {
   public static $modules = array('filter', 'text');
 
   /**
+   * @var string
+   */
+  protected $entity_name;
+
+  /**
+   * @var \Drupal\user\Entity\User
+   */
+  protected $entity_user;
+
+  /**
+   * @var string
+   */
+  protected $entity_field_text;
+
+  /**
    * {@inheritdoc}
    */
   public function setUp() {
diff --git a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php
index 2ae87fc..94a2f9a 100644
--- a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php
+++ b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php
@@ -37,6 +37,11 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
   protected $field_name;
 
   /**
+   * @var int
+   */
+  protected $field_cardinality;
+
+  /**
    * A field storage to use in this class.
    *
    * @var \Drupal\field\Entity\FieldStorageConfig
@@ -51,6 +56,11 @@ class FieldSqlStorageTest extends EntityUnitTestBase {
   protected $instance;
 
   /**
+   * @var string
+   */
+  protected $table;
+
+  /**
    * Name of the revision table of the field.
    *
    * @var string
diff --git a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php
index 597bb03..820e4aa 100644
--- a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php
+++ b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php
@@ -21,6 +21,11 @@ class ModuleHandlerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
+  public static $modules = array('system');
+
+  /**
+   * {@inheritdoc}
+   */
   public function containerBuild(ContainerBuilder $container) {
     parent::containerBuild($container);
     // Put a fake route bumper on the container to be called during uninstall.
diff --git a/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php
index 03a94cf..7f5caad 100644
--- a/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php
+++ b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php
@@ -23,7 +23,7 @@ class ThemeHandlerTest extends DrupalUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('system', 'menu_link');
+  public static $modules = array('system');
 
   public function containerBuild(ContainerBuilder $container) {
     parent::containerBuild($container);
diff --git a/core/modules/system/src/Tests/File/NameMungingTest.php b/core/modules/system/src/Tests/File/NameMungingTest.php
index 1584067..a4542cb 100644
--- a/core/modules/system/src/Tests/File/NameMungingTest.php
+++ b/core/modules/system/src/Tests/File/NameMungingTest.php
@@ -13,6 +13,22 @@
  * @group File
  */
 class NameMungingTest extends FileTestBase {
+
+  /**
+   * @var string
+   */
+  protected $bad_extension;
+
+  /**
+   * @var string
+   */
+  protected $name;
+
+  /**
+   * @var string
+   */
+  protected $name_with_uc_ext;
+
   function setUp() {
     parent::setUp();
     $this->bad_extension = 'php';
diff --git a/core/modules/system/src/Tests/File/ScanDirectoryTest.php b/core/modules/system/src/Tests/File/ScanDirectoryTest.php
index cda57de..0777460 100644
--- a/core/modules/system/src/Tests/File/ScanDirectoryTest.php
+++ b/core/modules/system/src/Tests/File/ScanDirectoryTest.php
@@ -21,6 +21,11 @@ class ScanDirectoryTest extends FileTestBase {
    */
   public static $modules = array('file_test');
 
+  /**
+   * @var string
+   */
+  protected $path;
+
   function setUp() {
     parent::setUp();
     $this->path = drupal_get_path('module', 'simpletest') . '/files';
diff --git a/core/modules/system/src/Tests/Form/FormCacheTest.php b/core/modules/system/src/Tests/Form/FormCacheTest.php
index 57dbb28..f551092 100644
--- a/core/modules/system/src/Tests/Form/FormCacheTest.php
+++ b/core/modules/system/src/Tests/Form/FormCacheTest.php
@@ -25,6 +25,21 @@ class FormCacheTest extends DrupalUnitTestBase {
    */
   public static $modules = array('system', 'user');
 
+  /**
+   * @var string
+   */
+  protected $form_build_id;
+
+  /**
+   * @var array
+   */
+  protected $form;
+
+  /**
+   * @var array
+   */
+  protected $form_state;
+
   public function setUp() {
     parent::setUp();
     $this->installSchema('system', array('key_value_expire'));
diff --git a/core/modules/system/src/Tests/Path/PathUnitTestBase.php b/core/modules/system/src/Tests/Path/PathUnitTestBase.php
index 4807d47..618d72e 100644
--- a/core/modules/system/src/Tests/Path/PathUnitTestBase.php
+++ b/core/modules/system/src/Tests/Path/PathUnitTestBase.php
@@ -15,6 +15,11 @@
  */
 abstract class PathUnitTestBase extends DrupalUnitTestBase {
 
+  /**
+   * @var \Drupal\system\Tests\Path\UrlAliasFixtures
+   */
+  protected $fixtures;
+
   public function setUp() {
     parent::setUp();
     $this->fixtures = new UrlAliasFixtures();
diff --git a/core/modules/system/src/Tests/System/ScriptTest.php b/core/modules/system/src/Tests/System/ScriptTest.php
index 0be6217..6f6d871 100644
--- a/core/modules/system/src/Tests/System/ScriptTest.php
+++ b/core/modules/system/src/Tests/System/ScriptTest.php
@@ -16,6 +16,11 @@
  */
 class ScriptTest extends DrupalUnitTestBase {
 
+  protected function setUp() {
+    parent::setUp();
+    require_once DRUPAL_ROOT . '/core/includes/install.inc';
+  }
+
   /**
    * Tests password-hash.sh.
    */
diff --git a/core/modules/system/src/Tests/TypedData/TypedDataTest.php b/core/modules/system/src/Tests/TypedData/TypedDataTest.php
index bc9bd8c..7413592 100644
--- a/core/modules/system/src/Tests/TypedData/TypedDataTest.php
+++ b/core/modules/system/src/Tests/TypedData/TypedDataTest.php
@@ -273,12 +273,12 @@ public function testGetAndSet() {
     $this->assertEqual($typed_data->validate()->count(), 0);
     // Try setting by URI.
     $typed_data->setValue($files[1]->getFileUri());
-    $this->assertEqual(is_resource($typed_data->getValue()), fopen($files[1]->getFileUri(), 'r'), 'Binary value was changed.');
+    $this->assertEqual(fgets($typed_data->getValue()), fgets(fopen($files[1]->getFileUri(), 'r')), 'Binary value was changed.');
     $this->assertTrue(is_string($typed_data->getString()), 'Binary value was converted to string');
     $this->assertEqual($typed_data->validate()->count(), 0);
     // Try setting by resource.
     $typed_data->setValue(fopen($files[2]->getFileUri(), 'r'));
-    $this->assertEqual(is_resource($typed_data->getValue()), fopen($files[2]->getFileUri(), 'r'), 'Binary value was changed.');
+    $this->assertEqual(fgets($typed_data->getValue()), fgets(fopen($files[2]->getFileUri(), 'r')), 'Binary value was changed.');
     $this->assertTrue(is_string($typed_data->getString()), 'Binary value was converted to string');
     $this->assertEqual($typed_data->validate()->count(), 0);
     $typed_data->setValue(NULL);
diff --git a/core/modules/text/src/Tests/Formatter/TextFormatterTest.php b/core/modules/text/src/Tests/Formatter/TextFormatterTest.php
index 4d99767..143928a 100644
--- a/core/modules/text/src/Tests/Formatter/TextFormatterTest.php
+++ b/core/modules/text/src/Tests/Formatter/TextFormatterTest.php
@@ -119,7 +119,6 @@ public function testFormatters() {
 
       // Verify the unprocessed text field formatter's render array.
       $build = $entity->get('unprocessed_text')->view(array('type' => $formatter));
-      debug($build[0]);
       $this->assertEqual($build[0]['#markup'], 'Hello, world!');
       $this->assertTrue(!isset($build[0]['#cache']), format_string('The @formatter formatter has the expected cache tags when formatting an unprocessed text field.', array('@formatter' => $formatter)));
     }
diff --git a/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php b/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php
index 167bcec..3af2dce 100644
--- a/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php
+++ b/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php
@@ -30,6 +30,71 @@ class TextPlainUnitTest extends DrupalUnitTestBase {
    */
   public static $modules = array('entity', 'field', 'text', 'entity_test', 'system', 'filter', 'user');
 
+  /**
+   * @var string
+   */
+  protected $entity_type;
+
+  /**
+   * @var string
+   */
+  protected $bundle;
+
+  /**
+   * @var string
+   */
+  protected $field_name;
+
+  /**
+   * @var string
+   */
+  protected $field_type;
+
+  /**
+   * @var array
+   */
+  protected $field_settings;
+
+  /**
+   * @var array
+   */
+  protected $instance_settings;
+
+  /**
+   * @var string
+   */
+  protected $formatter_type;
+
+  /**
+   * @var array
+   */
+  protected $formatter_settings;
+
+  /**
+   * @var \Drupal\field\Entity\FieldStorageConfig
+   */
+  protected $fieldStorage;
+
+  /**
+   * @var \Drupal\field\Entity\FieldInstanceConfig
+   */
+  protected $instance;
+
+  /**
+   * @var string
+   */
+  protected $view_mode;
+
+  /**
+   * @var \Drupal\entity\Entity\EntityViewDisplay
+   */
+  protected $display;
+
+  /**
+   * @var string
+   */
+  protected $langcode;
+
   function setUp() {
     parent::setUp();
 
diff --git a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
index 47849b9..492218f 100644
--- a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
+++ b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
@@ -30,6 +30,7 @@ class UserAccountFormFieldsTest extends DrupalUnitTestBase {
    */
   function testInstallConfigureForm() {
     require_once DRUPAL_ROOT . '/core/includes/install.core.inc';
+    require_once DRUPAL_ROOT . '/core/includes/install.inc';
     $install_state = install_state_defaults();
     $form_state = new FormState();
     $form_state['build_info']['args'][] = &$install_state;
diff --git a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php
index 3c29b9e..8eb006d 100644
--- a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php
+++ b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php
@@ -24,7 +24,7 @@ class RowEntityRenderersTest extends ViewUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('entity', 'field', 'filter', 'text', 'node', 'user', 'language', 'menu_link');
+  public static $modules = array('entity', 'field', 'filter', 'text', 'node', 'user', 'language');
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php b/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php
index cdd1626..e019168 100644
--- a/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php
+++ b/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php
@@ -23,6 +23,11 @@
   public static $modules = array('system', 'user', 'entity', 'field');
 
   /**
+   * @var \Drupal\user\Entity\User
+   */
+  protected $root_user;
+
+  /**
    * Overrides \Drupal\views\Tests\ViewUnitTestBase::setUpFixtures().
    */
   protected function setUpFixtures() {
diff --git a/core/modules/views/src/Tests/Plugin/RowEntityTest.php b/core/modules/views/src/Tests/Plugin/RowEntityTest.php
index 6fb65d3..583fb61 100644
--- a/core/modules/views/src/Tests/Plugin/RowEntityTest.php
+++ b/core/modules/views/src/Tests/Plugin/RowEntityTest.php
@@ -24,7 +24,7 @@ class RowEntityTest extends ViewUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('taxonomy', 'text', 'filter', 'field', 'entity', 'system', 'menu_link');
+  public static $modules = array('taxonomy', 'text', 'filter', 'field', 'entity', 'system');
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/src/Tests/ViewExecutableTest.php b/core/modules/views/src/Tests/ViewExecutableTest.php
index 11a1b7f..fd7f628 100644
--- a/core/modules/views/src/Tests/ViewExecutableTest.php
+++ b/core/modules/views/src/Tests/ViewExecutableTest.php
@@ -30,7 +30,7 @@
  */
 class ViewExecutableTest extends ViewUnitTestBase {
 
-  public static $modules = array('system', 'node', 'comment', 'user', 'filter', 'entity', 'field', 'field_sql_storage', 'text');
+  public static $modules = array('system', 'node', 'comment', 'user', 'filter', 'entity', 'field', 'text');
 
   /**
    * Views used by this test.
diff --git a/core/modules/views/src/Tests/ViewStorageTest.php b/core/modules/views/src/Tests/ViewStorageTest.php
index 08c9e27..fc78a9e 100644
--- a/core/modules/views/src/Tests/ViewStorageTest.php
+++ b/core/modules/views/src/Tests/ViewStorageTest.php
@@ -186,7 +186,6 @@ protected function displayTests() {
    */
   protected function displayMethodTests() {
     // Enable the system module so l() can work using url_alias table.
-    $this->enableModules(array('system'));
     $this->installSchema('system', 'url_alias');
 
     $config['display'] = array(
diff --git a/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php b/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php
index 97807b2..9f2ab31 100644
--- a/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php
+++ b/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php
@@ -25,7 +25,7 @@ class WizardPluginBaseUnitTest extends ViewUnitTestBase {
    *
    * @var array
    */
-  public static $modules = array('language', 'system', 'user');
+  public static $modules = array('language', 'system', 'user', 'views_ui');
 
   /**
    * Contains thw wizard plugin manager.
@@ -39,8 +39,6 @@ protected function setUp() {
 
     $this->installConfig(array('language'));
 
-    $this->enableModules(array('views_ui'));
-
     $this->wizard = $this->container->get('plugin.manager.views.wizard')->createInstance('standard:views_test_data', array());
   }
 
-- 
1.7.11.msysgit.1

