$this->
resetAll();
$this->
assertEmpty($user->
getPassword());
$this->
assertTrue($user->
isBlocked());
$this->
assertMailString('body', 'Your application for an account is', 2
);
$this->
assertMailString('body', 'Bob.Arctor has applied for an account', 2
);
// Verify that an authenticated user cannot register a new user, despite
// being granted permission to do so because only anonymous users can
// register themselves, authenticated users with the necessary permissions
// can POST a new user to the "user" REST resource.
$this->
initAuthentication();
$response =
$this->
registerRequest($this->account->
getAccountName());
$this->
assertResourceErrorResponse(403, "Only anonymous users can register a user.",
$response);
} /**
* Create the request body.
*
* @param string $name
* Name.
* @param bool $include_password
* Include Password.
* @param bool $include_email
* Include Email.
*
* @return array
* Return the request body.
*/