protected function tearDown()
 {
     Schema::drop('testing_table');
     $this->kernel->call('migrate:rollback');
     $this->app->flush();
     $this->app = null;
     parent::tearDown();
 }
 /**
  * Stop the application
  *
  * @return void
  */
 public function stopApplication()
 {
     if ($this->hasApplicationBeenStarted()) {
         foreach ($this->beforeApplicationDestroyedCallbacks as $callback) {
             call_user_func($callback);
         }
         $this->app->flush();
         $this->app = null;
         Facade::clearResolvedInstances();
         Facade::setFacadeApplication(null);
     }
 }
示例#3
0
 /**
  * Clean up the testing environment before the next test.
  *
  * @return void
  */
 public function tearDown()
 {
     if (class_exists('Mockery')) {
         Mockery::close();
     }
     if ($this->app) {
         foreach ($this->beforeApplicationDestroyedCallbacks as $callback) {
             call_user_func($callback);
         }
         $this->app->flush();
         $this->app = null;
     }
     if (property_exists($this, 'serverVariables')) {
         $this->serverVariables = [];
     }
 }
示例#4
0
 /**
  * Flush the container of all bindings and resolved instances.
  *
  * @return void 
  * @static 
  */
 public static function flush()
 {
     \Illuminate\Foundation\Application::flush();
 }
 /**
  * Tear down test case.
  */
 protected function tearDown()
 {
     $this->app->flush();
 }
示例#6
0
 /**
  * Flush the container of all bindings and resolved instances.
  *
  * @return void
  */
 public function flush()
 {
     parent::flush();
     $this->hasBeenBootstrapped = false;
 }
示例#7
0
 /**
  * Clean up the testing environment before the next test.
  *
  * @tearDown
  * @return void
  */
 public function tearDownLaravel()
 {
     if ($this->app) {
         $this->app->flush();
     }
 }