public function ServicesModuleTests::testServicesEndpointNew in Services 6.3
Test services_endpoint_new().
File
- tests/
unit/ TestServicesModule.test, line 141 - Unit tests for the functions in the 'services.module' file.
Class
- ServicesModuleTests
- Run test cases for the functions in the 'services.module' file.
Code
public function testServicesEndpointNew() {
$results = services_endpoint_new();
$results_type = gettype($results);
$message = t('services_endpoints_new() should return an object.');
$this
->assertEqual($results_type, 'object', $message);
$string = 'New Service object should have property ';
$this
->assertTrue(property_exists($results, 'eid'), t($string . 'eid.'));
$this
->assertTrue(property_exists($results, 'name'), t($string . 'name.'));
$this
->assertTrue(property_exists($results, 'server'), t($string . 'server.'));
$this
->assertTrue(property_exists($results, 'path'), t($string . 'path.'));
}