Skip to content

Commit

Permalink
check dir existing
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Oct 30, 2020
1 parent f4b6714 commit bb64ff3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/NewCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ public function test_it_can_scaffold_a_new_laravel_app()
}
}


if (! file_exists($scaffoldDirectory)) {
die($scaffoldDirectory . ' not existing');
}


$app = new Application('Laravel Installer');
$app->add(new NewCommand);

$tester = new CommandTester($app->find('new'));

$statusCode = $tester->execute(['name' => $scaffoldDirectoryName], ['capture_stderr_separately' => true]);

var_dump($tester->getErrorOutput());
$statusCode = $tester->execute(['name' => $scaffoldDirectoryName]);

$this->assertSame(0, $statusCode);
$this->assertDirectoryExists($scaffoldDirectory.'/vendor');
Expand Down

0 comments on commit bb64ff3

Please sign in to comment.