/**
  * Generate a full password reset request for an account
  *
  * @param Account $account
  * @return PasswordResetRequest
  */
 public static function generate(Account $account, $nonce = null)
 {
     $nonce = $nonce !== null ? $nonce : nonce();
     return PasswordResetRequest::create(['_account_id' => $account->id(), 'nonce' => $nonce]);
 }
 /**
  * @group first
  */
 public function testModelCreateARequestWithTheRawModelFunctionality()
 {
     $req = PasswordResetRequest::create(['_account_id' => $this->account_id, 'nonce' => '777666888']);
     $this->assertInstanceOf('NinjaWars\\core\\data\\PasswordResetRequest', $req);
     $this->assertGreaterThan(0, (int) $req->nonce);
 }