public function ServicesRESTServerTests::setUp in Services 7.3
Sets up unit test environment.
Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not install modules because tests are performed without accessing the database. Any required files must be explicitly included by the child class setUp() method.
Overrides DrupalUnitTestCase::setUp
File
- servers/
rest_server/ tests/ ServicesRESTServerTests.test, line 22
Class
- ServicesRESTServerTests
- Unit tests for RESTServer class.
Code
public function setUp() {
parent::setUp();
module_load_include('inc', 'services', 'includes/services.runtime');
module_load_include('inc', 'rest_server', 'includes/RESTServer');
module_load_include('inc', 'rest_server', 'includes/ServicesContentTypeNegotiator');
module_load_include('inc', 'rest_server', 'includes/ServicesContext');
module_load_include('inc', 'rest_server', 'includes/ServicesParser');
module_load_include('inc', 'rest_server', 'includes/ServicesFormatter');
module_load_include('inc', 'rest_server', 'includes/ServicesRESTServerFactory');
module_load_include('inc', 'rest_server', 'tests/rest_server_mock_classes');
}