diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
index 87b43f7..a31aa75 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
@@ -268,4 +268,27 @@ public function url($rel = 'edit-form', $options = array()) {
     return parent::url($rel, $options);
   }
 
+  /**
+   * Implements the magic __sleep() method.
+   *
+   * Using the Serialize interface and serialize() / unserialize() methods
+   * breaks entity forms in PHP 5.4.
+   * @todo Investigate in https://drupal.org/node/2074253.
+   */
+  public function __sleep() {
+    // Only serialize properties from getExportProperties().
+    $keys = array_keys($this->getExportProperties());
+    $keys[] = 'entityTypeId';
+    return $keys;
+  }
+
+  /**
+   * Implements the magic __wakeup() method.
+   */
+  public function __wakeup() {
+    // Run the values from getExportProperties() through __construct().
+    $values = array_intersect_key($this->getExportProperties(), get_object_vars($this));
+    $this->__construct($values, $this->entityTypeId);
+  }
+
 }
diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php
index 18b8dc5..a46f805 100644
--- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php
+++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php
@@ -144,23 +144,4 @@ public function getRenderer($field_name) {
     return $widget;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function __sleep() {
-    // Only store the definition, not external objects or derived data.
-    $keys = array_keys($this->getExportProperties());
-    $keys[] = 'entityTypeId';
-    return $keys;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function __wakeup() {
-    // Run the values from getExportProperties() through __construct().
-    $values = array_intersect_key($this->getExportProperties(), get_object_vars($this));
-    $this->__construct($values, $this->entityTypeId);
-  }
-
 }
diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
index 503fe14..b5cb63a 100644
--- a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
+++ b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
@@ -689,27 +689,6 @@ public function hasData() {
   }
 
   /**
-   * Implements the magic __sleep() method.
-   *
-   * Using the Serialize interface and serialize() / unserialize() methods
-   * breaks entity forms in PHP 5.4.
-   * @todo Investigate in https://drupal.org/node/2074253.
-   */
-  public function __sleep() {
-    // Only serialize properties from getExportProperties().
-    return array_keys(array_intersect_key($this->getExportProperties(), get_object_vars($this)));
-  }
-
-  /**
-   * Implements the magic __wakeup() method.
-   */
-  public function __wakeup() {
-    // Run the values from getExportProperties() through __construct().
-    $values = array_intersect_key($this->getExportProperties(), get_object_vars($this));
-    $this->__construct($values);
-  }
-
-  /**
    * {@inheritdoc}
    */
   public static function createFromDataType($type) {
diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php b/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
index 6024061..ac6f18d 100644
--- a/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
+++ b/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
@@ -611,27 +611,6 @@ public function targetBundle() {
     return $this->bundle;
   }
 
-  /*
-   * Implements the magic __sleep() method.
-   *
-   * Using the Serialize interface and serialize() / unserialize() methods
-   * breaks entity forms in PHP 5.4.
-   * @todo Investigate in https://drupal.org/node/2074253.
-   */
-  public function __sleep() {
-    // Only serialize properties from getExportProperties().
-    return array_keys(array_intersect_key($this->getExportProperties(), get_object_vars($this)));
-  }
-
-  /**
-   * Implements the magic __wakeup() method.
-   */
-  public function __wakeup() {
-    // Run the values from getExportProperties() through __construct().
-    $values = array_intersect_key($this->getExportProperties(), get_object_vars($this));
-    $this->__construct($values);
-  }
-
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/tour/tests/Drupal/tour/Tests/Entity/TourTest.php b/core/modules/tour/tests/Drupal/tour/Tests/Entity/TourTest.php
index 6693cec..ac39a62 100644
--- a/core/modules/tour/tests/Drupal/tour/Tests/Entity/TourTest.php
+++ b/core/modules/tour/tests/Drupal/tour/Tests/Entity/TourTest.php
@@ -7,6 +7,7 @@
 namespace Drupal\tour\Tests\Entity\TourTest;
 
 use Drupal\Tests\UnitTestCase;
+use Drupal\Core\DependencyInjection\ContainerBuilder;
 
 /**
  * Tests the Tour entity.
@@ -45,8 +46,17 @@ public static function getInfo() {
    * @dataProvider routeProvider
    */
   public function testHasMatchingRoute($routes, $route_name, $route_params, $result) {
-    $tour = $this->getMockBuilder('\Drupal\tour\Entity\Tour')
+    // Tour::__construct() pulls the plugin.manager.tour.tip service from the
+    // container. Mock it and and place it there.
+    $tip_manager = $this->getMockBuilder('Drupal\tour\TipPluginManager')
       ->disableOriginalConstructor()
+      ->getMock();
+    $container = new ContainerBuilder();
+    $container->set('plugin.manager.tour.tip', $tip_manager);
+    \Drupal::setContainer($container);
+
+    $tour = $this->getMockBuilder('\Drupal\tour\Entity\Tour')
+      ->setConstructorArgs(array(array(), 'tour'))
       ->setMethods(array('getRoutes'))
       ->getMock();
 
