Пример #1
0
 /**
  * Migrate & Seed the test DB
  */
 public function setUp()
 {
     parent::setUp();
     if (!$this->use_database) {
         return;
     }
     Artisan::call('zapper:truncate');
     if (!in_array('--no-seed', $_SERVER['argv'])) {
         Artisan::call('db:seed');
     }
 }
Пример #2
0
 /**
  * Migrate & Seed the test DB
  */
 public function setUp()
 {
     parent::setUp();
     if (!$this->use_database) {
         return;
     }
     if ($this->test_db) {
         Config::set('database.connections.' . DB::getName() . '.database', $this->test_db);
         DB::reconnect();
     }
     $this->pdo = DB::connection()->getPdo();
     $this->pdo->beginTransaction();
 }