Skip to content

Commit 4b2d4db

Browse files
author
Elliot Levin
committed
Attempt to get tests passing on travis
1 parent d2aef29 commit 4b2d4db

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/Tests/Integration/Fixtures/DmsFixture.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Container\Container;
99
use Illuminate\Contracts\Foundation\Application;
1010
use Illuminate\Database\Migrations\MigrationCreator;
11+
use Illuminate\Database\Migrations\Migrator;
1112
use Illuminate\Filesystem\Filesystem;
1213

1314
/**
@@ -59,7 +60,6 @@ public function setUpBeforeClass(Application $app)
5960
unlink($migrationFile);
6061
}
6162

62-
$app['config']->set('database.default', 'testing-stub');
6363
$app['config']->set('database.default', 'testing-stub');
6464
$app['config']->set('database.connections.testing-stub', [
6565
'driver' => 'sqlite',
@@ -73,6 +73,10 @@ public function setUpBeforeClass(Application $app)
7373
$migrationsPath
7474
);
7575

76+
app()->resolving(Migrator::class, function (Migrator $migrator) {
77+
$migrator->path($this->migrationsPath());
78+
});
79+
7680
if (!@file_get_contents($this->dbStubFile())) {
7781
file_put_contents($this->dbStubFile(), '');
7882

@@ -115,7 +119,7 @@ public function setUp(Application $app)
115119
*/
116120
protected function migrationsPath()
117121
{
118-
return base_path('migrations');
122+
return __DIR__ . '/../temp/migrations';
119123
}
120124

121125
/**

tests/Tests/Integration/Scaffold/ScaffoldTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ protected function assertDirectoriesEqual(string $expected, string $actual, bool
5151
return substr($file->getRealPath(), strlen(realpath($actual)));
5252
}, $actualFiles);
5353

54+
sort($expectedFiles, SORT_STRING);
55+
sort($actualFiles, SORT_STRING);
56+
5457
$this->assertEquals($expectedFiles, $actualFiles);
5558

5659
foreach ($expectedFiles as $expectedFile) {

0 commit comments

Comments
 (0)