Skip to content

Commit d98d561

Browse files
committed
ITT: relative_path helper used.
1 parent ce546d1 commit d98d561

File tree

3 files changed

+107
-12
lines changed

3 files changed

+107
-12
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require-dev": {
1919
"phpunit/phpunit": "^5.0",
2020
"orchestra/testbench": "^3.1",
21-
"symfony/filesystem": "^2.7|^3.0"
21+
"illuminated/helper-functions": "^1.0"
2222
},
2323
"autoload": {
2424
"psr-4": {

composer.lock

Lines changed: 105 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: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Illuminate\Support\Facades\DB;
88
use Illuminated\Testing\TestingTools;
99
use Kernel;
10-
use Symfony\Component\Filesystem\Filesystem;
1110

1211
abstract class TestCase extends \Orchestra\Testbench\TestCase
1312
{
@@ -37,19 +36,11 @@ protected function setUpDatabase()
3736

3837
$this->artisan('migrate', [
3938
'--database' => 'testing',
40-
'--path' => $this->getMigrationsPath(),
39+
'--path' => relative_path(__DIR__, base_path()) . '/fixture/database/migrations/',
4140
]);
4241
$this->seeArtisanOutput(__DIR__ . '/migrate.output.txt');
4342
}
4443

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-
5344
private function setUpFactories()
5445
{
5546
$this->withFactories(__DIR__ . '/fixture/database/factories');

0 commit comments

Comments
 (0)