Exemplo n.º 1
0
 /**
  * @return void
  */
 protected function setupDatabaseMigrator()
 {
     if (self::$databaseMigrator) {
         return;
     }
     $databaseMigratorFactory = new DatabaseMigratorFactory();
     self::$databaseMigrator = $databaseMigratorFactory->create();
 }
Exemplo n.º 2
0
 /**
  * @throws \Exception
  */
 public function setUp()
 {
     parent::setUp();
     $this->faker = FakerFactory::create();
     if (self::$migrationFailed) {
         $this->markTestSkipped('Previous migration failed.');
         return;
     }
     try {
         $this->setupDatabaseMigrator();
         self::$databaseMigrator->run();
     } catch (Exception $e) {
         self::$migrationFailed = true;
         throw $e;
     }
     Route::enableFilters();
     self::bootModels();
 }