function ServicesResourceUsertests::testDeleteUser in Services 7.3
Same name and namespace in other branches
- 6.3 tests/functional/ServicesResourceUserTests.test \ServicesResourceUsertests::testDeleteUser()
Test delete method.
File
- tests/
functional/ ServicesResourceUserTests.test, line 318 - Call the endpoint tests when no authentication is being used.
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), 'User has been deleted successfully.', 'UserResource: Delete');
}