forked from dahabit/Laravel-4-Generators
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5ab2b7
commit 648968e
Showing
6 changed files
with
116 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
default: | ||
paths: | ||
features: tests/features | ||
bootstrap: %behat.paths.features%/bootstrap | ||
extensions: | ||
Behat\MinkExtension\Extension: | ||
base_url: http://localhost:8000 | ||
goutte: ~ | ||
selenium2: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Feature: Generators | ||
|
||
Scenario Outline: Generation | ||
When I generate a <command> with "<argument>" | ||
Then I should see "Created:" | ||
And "<generatedFilePath>" should match my stub | ||
|
||
Examples: | ||
| command | argument | generatedFilePath | | ||
| model | Order | app/models/Order.php | | ||
| seed | orders | app/database/seeds/OrdersTableSeeder.php | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
class Order extends \Eloquent { | ||
protected $fillable = []; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
// Composer: "fzaninotto/faker": "v1.3.0" | ||
use Faker\Factory as Faker; | ||
|
||
class OrdersTableSeeder extends Seeder { | ||
|
||
public function run() | ||
{ | ||
$faker = Faker::create(); | ||
|
||
foreach(range(1, 10) as $index) | ||
{ | ||
Order::create([ | ||
|
||
]); | ||
} | ||
} | ||
|
||
} |