예제 #1
0
 /**
  * Clean up the testing environment before the next test.
  *
  * @return void
  */
 protected function tearDown()
 {
     if ($this->app) {
         foreach ($this->beforeApplicationDestroyedCallbacks as $callback) {
             call_user_func($callback);
         }
         $this->app->flush();
         $this->app = null;
     }
     $this->setUpHasRun = false;
     if (property_exists($this, 'serverVariables')) {
         $this->serverVariables = [];
     }
     if (class_exists('Mockery')) {
         Mockery::close();
     }
     $this->afterApplicationCreatedCallbacks = [];
     $this->beforeApplicationDestroyedCallbacks = [];
 }