Skip to content

Commit

Permalink
ITT: relative_path helper used.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ivanov committed Mar 15, 2017
1 parent ce546d1 commit d98d561
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require-dev": {
"phpunit/phpunit": "^5.0",
"orchestra/testbench": "^3.1",
"symfony/filesystem": "^2.7|^3.0"
"illuminated/helper-functions": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
106 changes: 105 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions tests/TestingTools/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Support\Facades\DB;
use Illuminated\Testing\TestingTools;
use Kernel;
use Symfony\Component\Filesystem\Filesystem;

abstract class TestCase extends \Orchestra\Testbench\TestCase
{
Expand Down Expand Up @@ -37,19 +36,11 @@ protected function setUpDatabase()

$this->artisan('migrate', [
'--database' => 'testing',
'--path' => $this->getMigrationsPath(),
'--path' => relative_path(__DIR__, base_path()) . '/fixture/database/migrations/',
]);
$this->seeArtisanOutput(__DIR__ . '/migrate.output.txt');
}

private function getMigrationsPath()
{
$endPath = realpath(__DIR__);
$startPath = realpath(base_path());

return (new Filesystem)->makePathRelative($endPath, $startPath) . 'fixture/database/migrations/';
}

private function setUpFactories()
{
$this->withFactories(__DIR__ . '/fixture/database/factories');
Expand Down

0 comments on commit d98d561

Please sign in to comment.