Skip to content

Instantly share code, notes, and snippets.

@devmsh
Created December 11, 2018 12:13
Show Gist options
  • Select an option

  • Save devmsh/5d57886b0a7c4d93e8ec8c808b72d475 to your computer and use it in GitHub Desktop.

Select an option

Save devmsh/5d57886b0a7c4d93e8ec8c808b72d475 to your computer and use it in GitHub Desktop.
TestCase migrate
<?php
abstract class TestCase extends BaseTestCase
{
const DATABASE_MIGRATIONS_USER = "database/migrations/user";
/**
* @param $path
*/
public function migrate($path)
{
foreach (array_wrap($path) as $key => $path) {
$migrateCommand = $key == 0 ? "migrate:fresh" : "migrate";
Artisan::call($migrateCommand, [
"--path" => $path,
]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment