diff --git a/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php b/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php index 4c039c296be55e5783cc7771b199f6b5cb5f9ee2..66f85c46f796c24b2a83270a3a07c8f24af6698b 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 28ffcea36c4a8efedc89bf890d199a492d36cf6d..0c710e529a0358375463c52126c51aaff17aa801 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.