function ServicesResourceUsertests::testDeleteUser in Services 6.3
Same name and namespace in other branches
- 7.3 tests/functional/ServicesResourceUserTests.test \ServicesResourceUsertests::testDeleteUser()
Test delete method.
File
- tests/
functional/ ServicesResourceUserTests.test, line 302
Class
- ServicesResourceUsertests
- Run test cases for the endpoint with no authentication turned on.
Code
function testDeleteUser() {
// Create user.
$account = $this
->drupalCreateUser();
// Delete user.
$response = $this
->servicesDelete($this->endpoint->path . '/user/' . $account->uid);
$user_load = user_load($account->uid);
$this
->assertTrue(empty($user_load), t('User has been deleted successfully.'), 'UserResource: Delete');
}