Commit 38d7dd26 authored by webchick's avatar webchick
Browse files

Issue #1847200 by klausi, Berdir: Limit the entity types which are used for the rest tests.

parent e83535c1
...@@ -33,7 +33,9 @@ public static function getInfo() { ...@@ -33,7 +33,9 @@ public static function getInfo() {
* Tests several valid and invalid delete requests on all entity types. * Tests several valid and invalid delete requests on all entity types.
*/ */
public function testDelete() { 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); $this->enableService('entity:' . $entity_type);
// Create a user account that has the required permissions to delete // Create a user account that has the required permissions to delete
// resources via the web API. // resources via the web API.
......
...@@ -33,11 +33,11 @@ public static function getInfo() { ...@@ -33,11 +33,11 @@ public static function getInfo() {
* Tests several valid and invalid read requests on all entity types. * Tests several valid and invalid read requests on all entity types.
*/ */
public function testRead() { public function testRead() {
// @todo once EntityNG is implemented for other entity types use the full // @todo once EntityNG is implemented for other entity types expand this at
// entity_get_info() for all entity types here. // least to nodes and users.
$entity_test_info = entity_get_info('entity_test'); // Define the entity types we want to test.
$entity_info = array('entity_test' => $entity_test_info); $entity_types = array('entity_test');
foreach ($entity_info as $entity_type => $info) { foreach ($entity_types as $entity_type) {
$this->enableService('entity:' . $entity_type); $this->enableService('entity:' . $entity_type);
// Create a user account that has the required permissions to delete // Create a user account that has the required permissions to delete
// resources via the web API. // resources via the web API.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment