function ServicesResourceUsertests::testRetrieveUser in Services 6.3
Same name and namespace in other branches
- 7.3 tests/functional/ServicesResourceUserTests.test \ServicesResourceUsertests::testRetrieveUser()
Test retrieve method.
File
- tests/
functional/ ServicesResourceUserTests.test, line 182
Class
- ServicesResourceUsertests
- Run test cases for the endpoint with no authentication turned on.
Code
function testRetrieveUser() {
$response = $this
->servicesGET($this->endpoint->path . '/user/' . $this->privileged_user->uid);
$account = $response['body'];
$users_are_the_same = $account->name == $this->privileged_user->name && ($account->mail = $this->privileged_user->mail) && ($account->roles = $this->privileged_user->roles);
$this
->assertTrue($users_are_the_same, t('Retrieved user is the same as created.'), 'UserResource: Retrieve');
}