title: Laravel unit test how to test Event with email without send an email
body: <p>how can I test this snippet without send an email ?</p>
  
  <pre><code>public function forgot() 
      {
          $isValid = $this-&gt;updateForm-&gt;valid(Input::only('email'));
          if ($isValid) {
              $result = $this-&gt;user-&gt;forgot($this-&gt;updateForm-&gt;data());
              if (isset($result['user']) &amp;&amp; ($result['success'] &gt; 0)) {
                  Event::fire('user.mail.forgot', array('data'=&gt;$result['user']));
                  return Response::json(array('success'=&gt;1),200);
              } 
              $error = isset($result['error'])?array_pop($result):trans('user.generror');
              return Response::json(array(
                'success'=&gt;0,
                'errors' =&gt; array('error'=&gt;array($error))),  
              200);
          }
          return Response::json(array(
                      'success' =&gt; 0,
                      'errors' =&gt; $this-&gt;updateForm-&gt;errors()), 
                      200
          );
      }
  </code></pre>
  
  <p>by now I test it with:</p>
  
  <pre><code>public function _getSuccess($content)
  {
      $json = str_replace(")]}',\n", '', $content);
      $native = json_decode($json);
      return $native-&gt;success;
  }
  public function _set200($method, $uri, $parameters = array())
  {
      $this-&gt;client-&gt;setServerParameter('HTTP_X-Requested-With', 'XMLHttpRequest');
      $response = $this-&gt;call($method, $uri, $parameters);
      $this-&gt;assertResponseStatus(200);
      return $response;
  }
  public function testUserForgot200Success()
  {
      $response = $this-&gt;_set200('POST', '/api/v1/users/forgot', array('email' =&gt; $this-&gt;userEmail));
      $this-&gt;assertSame(1, $this-&gt;_getSuccess($response-&gt;getContent()));
  }
  </code></pre>
  
  <p>but in this way I have to set up the mail config file in the testing folder and the sustem send an a email :(</p>