From 38d7dd2605c22ea446ba0a19f369efd659dfb1a4 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Tue, 27 Nov 2012 22:28:55 -0800
Subject: [PATCH] Issue #1847200 by klausi, Berdir: Limit the entity types
 which are used for the rest tests.

---
 core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php |  4 +++-
 core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php   | 10 +++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php b/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php
index 4c039c296be5..66f85c46f796 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php
@@ -33,7 +33,9 @@ public static function getInfo() {
    * Tests several valid and invalid delete requests on all entity types.
    */
   public function testDelete() {
-    foreach (entity_get_info() as $entity_type => $info) {
+    // Define the entity types we want to test.
+    $entity_types = array('entity_test', 'node', 'user');
+    foreach ($entity_types as $entity_type) {
       $this->enableService('entity:' . $entity_type);
       // Create a user account that has the required permissions to delete
       // resources via the web API.
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php b/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php
index 28ffcea36c4a..0c710e529a03 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php
@@ -33,11 +33,11 @@ public static function getInfo() {
    * Tests several valid and invalid read requests on all entity types.
    */
   public function testRead() {
-    // @todo once EntityNG is implemented for other entity types use the full
-    // entity_get_info() for all entity types here.
-    $entity_test_info = entity_get_info('entity_test');
-    $entity_info = array('entity_test' => $entity_test_info);
-    foreach ($entity_info as $entity_type => $info) {
+    // @todo once EntityNG is implemented for other entity types expand this at
+    // least to nodes and users.
+    // Define the entity types we want to test.
+    $entity_types = array('entity_test');
+    foreach ($entity_types as $entity_type) {
       $this->enableService('entity:' . $entity_type);
       // Create a user account that has the required permissions to delete
       // resources via the web API.
-- 
GitLab