From eaddf5ad3f6809bfe048cbf925b8a1c14608b46b Mon Sep 17 00:00:00 2001
From: Bram Goffings <bramgoffings@gmail.com>
Date: Tue, 22 May 2012 14:34:00 +0200
Subject: [PATCH 11/11] test entity controller to psr-0

---
 .../field_test/TestEntityBundleController.php      |   28 ++++++++++++++++++++
 core/modules/field/tests/field_test.entity.inc     |   21 ---------------
 core/modules/field/tests/field_test.info           |    1 -
 3 files changed, 28 insertions(+), 22 deletions(-)
 create mode 100644 core/modules/field/lib/Drupal/field_test/TestEntityBundleController.php

diff --git a/core/modules/field/lib/Drupal/field_test/TestEntityBundleController.php b/core/modules/field/lib/Drupal/field_test/TestEntityBundleController.php
new file mode 100644
index 0000000..a824765
--- /dev/null
+++ b/core/modules/field/lib/Drupal/field_test/TestEntityBundleController.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\field_test\TestEntityBundleController.
+ */
+
+namespace Drupal\field_test;
+
+use Drupal\entity\EntityController;
+
+/**
+ * Controller class for the test_entity_bundle entity type.
+ *
+ * This extends the Drupal\entity\EntityController class, adding required
+ * special handling for bundles (since they are not stored in the database).
+ */
+class TestEntityBundleController extends EntityController {
+
+  protected function attachLoad(&$entities, $revision_id = FALSE) {
+    // Add bundle information.
+    foreach ($entities as $key => $entity) {
+      $entity->fttype = 'test_entity_bundle';
+      $entities[$key] = $entity;
+    }
+    parent::attachLoad($entities, $revision_id);
+  }
+}
diff --git a/core/modules/field/tests/field_test.entity.inc b/core/modules/field/tests/field_test.entity.inc
index c8ad3d9..b793b2c 100644
--- a/core/modules/field/tests/field_test.entity.inc
+++ b/core/modules/field/tests/field_test.entity.inc
@@ -5,8 +5,6 @@
  * Defines an entity type.
  */
 
-use Drupal\entity\EntityController;
-
 /**
  * Implements hook_entity_info().
  */
@@ -476,22 +474,3 @@ function field_test_entity_nested_form_submit($form, &$form_state) {
 
   drupal_set_message(t('test_entities @id_1 and @id_2 have been updated.', array('@id_1' => $entity_1->ftid, '@id_2' => $entity_2->ftid)));
 }
-
-/**
- * Controller class for the test_entity_bundle entity type.
- *
- * This extends the Drupal\entity\EntityController class, adding
- * required special handling for bundles (since they are not stored in the
- * database).
- */
-class TestEntityBundleController extends EntityController {
-
-  protected function attachLoad(&$entities, $revision_id = FALSE) {
-    // Add bundle information.
-    foreach ($entities as $key => $entity) {
-      $entity->fttype = 'test_entity_bundle';
-      $entities[$key] = $entity;
-    }
-    parent::attachLoad($entities, $revision_id);
-  }
-}
diff --git a/core/modules/field/tests/field_test.info b/core/modules/field/tests/field_test.info
index 5fc9b27..44d5233 100644
--- a/core/modules/field/tests/field_test.info
+++ b/core/modules/field/tests/field_test.info
@@ -2,6 +2,5 @@ name = "Field API Test"
 description = "Support module for the Field API tests."
 core = 8.x
 package = Testing
-files[] = field_test.entity.inc
 version = VERSION
 hidden = TRUE
-- 
1.7.4.msysgit.0

