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); } }
/** * 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 = []; } }
/** * 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(); }
/** * Flush the container of all bindings and resolved instances. * * @return void */ public function flush() { parent::flush(); $this->hasBeenBootstrapped = false; }
/** * Clean up the testing environment before the next test. * * @tearDown * @return void */ public function tearDownLaravel() { if ($this->app) { $this->app->flush(); } }