You are here

public function ServicesEntityGenericEntityResource::setUp in Services Entity API 7.2

Implements setUp().

Overrides ServicesWebTestCase::setUp

File

tests/services_entity.test, line 340
Services Entity Tests

Class

ServicesEntityGenericEntityResource
Test resources on the Generic controller, using a test entity type.

Code

public function setUp() {
  parent::setUp('libraries', 'entity', 'services_entity', 'services_entity_test');

  // Set up endpoint.
  $this->endpoint = $this
    ->saveNewEndpoint(array(
    'entity_services_entity_test',
  ));
  $this->resource_path = $this->endpoint->path . '/entity_services_entity_test';

  // Create an unprivileged user.
  $this->unPrivilegedUser = $this
    ->drupalCreateUser();

  // Set the resource class to use.
  variable_set('services_entity_resource_class', $this->services_entity_resource_class);
}