You are here

public function UserpointsServiceTestCase::setUp in User Points 7

Same name and namespace in other branches
  1. 7.2 userpoints_service/userpoints_service.test \UserpointsServiceTestCase::setUp()

Implementation of setUp().

Overrides ServicesWebTestCase::setUp

File

./userpoints_service.test, line 41
Tests for Userpoints Services integration.

Class

UserpointsServiceTestCase

Code

public function setUp() {
  parent::setUp(array(
    'ctools',
    'services',
    'rest_server',
    'userpoints',
    'userpoints_service',
  ));

  // Set up endpoint.
  $this->endpoint = $this
    ->saveNewEndpoint();

  // Extend endpoint with userpoints resources.
  $this->endpoint->resources += array(
    'userpoints' => array(
      'alias' => '',
      'operations' => array(
        'retrieve' => array(
          'enabled' => 1,
        ),
        'index' => array(
          'enabled' => 1,
        ),
      ),
      'actions' => array(
        'add' => array(
          'enabled' => 1,
        ),
      ),
    ),
  );
  services_endpoint_save($this->endpoint);
}