currentConfig = app('config'); $this->currentArgv = $_SERVER['argv']; parent::__construct($name, $data, $dataName); } /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { /** * Lost argv are restored. */ if (empty($_SERVER['argv'])) { $_SERVER['argv'] = $this->currentArgv; } parent::setUp(); /** * Lost config are restored. */ app()->instance('config', $this->currentConfig); } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { parent::tearDown(); } }