Add database creation for testing

This commit is contained in:
Josiah Dahl 2017-08-07 12:23:08 -07:00
parent 9a82b80cb1
commit a2cb5e4437
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
$I = new AcceptanceTester($scenario);
$I->wantTo('Generate RESTful resources from a file with Laravel Routes');
$I->writeToFile('database/database.sqlite', '');
$I->runShellCommand('php artisan wn:resources tests/_data/ResourcesTest.yml --laravel=true');
// Checking the model
@ -106,6 +107,8 @@ $I->writeToFile('./database/factories/ModelFactory.php', "<?php
});
");
$I->deleteFile('database/database.sqlite');
// Checking database seeder
// $I->openFile('./database/seeds/TaskCategoriesTableSeeder.php');
// $I->seeInThisFile('

View File

@ -17,7 +17,7 @@ class ResourceCommand extends BaseCommand {
{--path=app : where to store the model file.}
{--parsed : tells the command that arguments have been already parsed. To use when calling the command from an other command and passing the parsed arguments and options}
{--force= : override the existing files}
{--laravel : Use Laravel style route definitions}
{--laravel= : Use Laravel style route definitions}
';
protected $description = 'Generates a model, migration, controller and routes for RESTful resource';