Skip to content

Commit

Permalink
Update support for new migration structure.
Browse files Browse the repository at this point in the history
Signed-off-by: crynobone <crynobone@gmail.com>
  • Loading branch information
crynobone committed Aug 17, 2016
1 parent 938acda commit 461d055
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 100 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"require": {
"php": ">=5.6.0",
"laravel/framework": "~5.3.0",
"orchestra/database": "~3.3.0",
"orchestra/database": "~3.3.1",
"fzaninotto/faker": "~1.4",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
Expand Down
10 changes: 5 additions & 5 deletions src/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ protected function afterApplicationCreated(callable $callback)
*
* @return void
*/
protected function loadMigrationsFrom($realpath)
protected function loadMigrationsFrom($path)
{
$options = is_array($realpath) ? $realpath : ['--realpath' => $realpath];
$options = is_array($path) ? $path : ['--path' => $path];

if (isset($options['--realpath'])) {
$this->app['migrator']->path($options['--realpath']);
if (isset($options['--path'])) {
$this->app['migrator']->path($options['--path']);
}

unset($options['--path'], $options['--realpath']);
unset($options['--path']);

$this->artisan('migrate', $options);

Expand Down
2 changes: 1 addition & 1 deletion tests/DatabaseFixtureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function setUp()
// path unless `--path` option is available.
$this->loadMigrationsFrom([
'--database' => 'testing',
'--realpath' => realpath(__DIR__.'/migrations'),
'--path' => realpath(__DIR__.'/migrations'),
]);
}

Expand Down
93 changes: 0 additions & 93 deletions tests/DatabaseLoadMigrationTest.php

This file was deleted.

0 comments on commit 461d055

Please sign in to comment.