mirror of
https://github.com/ZorgCC/lumen-generators.git
synced 2024-12-27 06:25:28 +03:00
Add database creation for testing
This commit is contained in:
parent
9a82b80cb1
commit
a2cb5e4437
@ -2,6 +2,7 @@
|
|||||||
$I = new AcceptanceTester($scenario);
|
$I = new AcceptanceTester($scenario);
|
||||||
|
|
||||||
$I->wantTo('Generate RESTful resources from a file with Laravel Routes');
|
$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');
|
$I->runShellCommand('php artisan wn:resources tests/_data/ResourcesTest.yml --laravel=true');
|
||||||
|
|
||||||
// Checking the model
|
// Checking the model
|
||||||
@ -106,6 +107,8 @@ $I->writeToFile('./database/factories/ModelFactory.php', "<?php
|
|||||||
});
|
});
|
||||||
");
|
");
|
||||||
|
|
||||||
|
$I->deleteFile('database/database.sqlite');
|
||||||
|
|
||||||
// Checking database seeder
|
// Checking database seeder
|
||||||
// $I->openFile('./database/seeds/TaskCategoriesTableSeeder.php');
|
// $I->openFile('./database/seeds/TaskCategoriesTableSeeder.php');
|
||||||
// $I->seeInThisFile('
|
// $I->seeInThisFile('
|
||||||
|
@ -17,7 +17,7 @@ class ResourceCommand extends BaseCommand {
|
|||||||
{--path=app : where to store the model file.}
|
{--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}
|
{--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}
|
{--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';
|
protected $description = 'Generates a model, migration, controller and routes for RESTful resource';
|
||||||
|
Loading…
Reference in New Issue
Block a user