Skip to content

Commit ca73cce

Browse files
committed
ITT: Made Laravel 5.1 related fixes.
1 parent f29dd99 commit ca73cce

File tree

4 files changed

+62
-10
lines changed

4 files changed

+62
-10
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "^5.0",
19-
"orchestra/testbench": "^3.1"
19+
"orchestra/testbench": "^3.1",
20+
"symfony/filesystem": "^2.7|^3.0"
2021
},
2122
"autoload": {
2223
"psr-4": {

composer.lock

Lines changed: 50 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/TestingTools/TestCase.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Support\Facades\DB;
88
use Illuminated\Testing\TestingTools;
99
use Kernel;
10+
use Symfony\Component\Filesystem\Filesystem;
1011

1112
abstract class TestCase extends \Orchestra\Testbench\TestCase
1213
{
@@ -36,11 +37,19 @@ protected function setUpDatabase()
3637

3738
$this->artisan('migrate', [
3839
'--database' => 'testing',
39-
'--realpath' => __DIR__ . '/fixture/database/migrations/',
40+
'--path' => $this->getMigrationsPath(),
4041
]);
4142
$this->seeArtisanOutput(__DIR__ . '/migrate.output.txt');
4243
}
4344

45+
private function getMigrationsPath()
46+
{
47+
$endPath = realpath(__DIR__);
48+
$startPath = realpath(base_path());
49+
50+
return (new Filesystem)->makePathRelative($endPath, $startPath) . 'fixture/database/migrations/';
51+
}
52+
4453
private function setUpFactories()
4554
{
4655
$this->withFactories(__DIR__ . '/fixture/database/factories');

tests/TestingTools/fixture/app/Providers/FixtureServiceProvider.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ public function register()
1010
$this->registerCommands();
1111
}
1212

13-
public function boot()
14-
{
15-
if (method_exists($this, 'loadMigrationsFrom')) {
16-
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations/');
17-
}
18-
}
19-
2013
private function registerAliases()
2114
{
2215
$this->app->booting(function () {

0 commit comments

Comments
 (0)