Last active
April 8, 2018 01:51
-
-
Save bgallagh3r/dc39f8bb18c380214919 to your computer and use it in GitHub Desktop.
Revisions
-
bgallagh3r revised this gist
May 22, 2014 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,15 @@ class FeatureContext extends BehatContext //or MinkContext if using Mink { /** * Laravel app instance * * @var \Illuminate\Foundation\Application */ protected static $laravel; /** * @static * @beforeSuite -
bgallagh3r revised this gist
May 22, 2014 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ <?php // Put this inside of your featurecontext class // This assumes the FeatureContext.php class is within app/tests/behat/features/bootstrap @@ -12,11 +13,10 @@ class FeatureContext extends BehatContext //or MinkContext if using Mink */ public static function bootstrapLaravel() { // Bootstrap Laravel self::$laravel = require __DIR__ . '/../../../../bootstrap/start.php'; self::$laravel['mail']->pretend(true); } /** @@ -25,7 +25,7 @@ public static function bootstrapLaravel() */ public static function setUpDb() { self::$laravel['artisan']->call('migrate:install'); } @@ -35,7 +35,7 @@ public static function setUpDb() */ public static function prepDb() { self::$laravel['artisan']->call('migrate:refresh'); self::$laravel['artisan']->call('db:seed'); } } -
davidstanley01 created this gist
Mar 7, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ // Put this inside of your featurecontext class // This assumes the FeatureContext.php class is within app/tests/behat/features/bootstrap // Another thing to note... I'm using sqlite in memory for these tests, // so I'm not worried about the db at the end of the run, just the install and start. class FeatureContext extends BehatContext //or MinkContext if using Mink { /** * @static * @beforeSuite */ public static function bootstrapLaravel() { $unitTesting = true; $testEnvironment = 'testing'; require_once __DIR__.'/../../../../../bootstrap/start.php'; Mail::pretend(true); } /** * @static * @beforeSuite */ public static function setUpDb() { Artisan::call('migrate:install'); } /** * @static * @beforeFeature */ public static function prepDb() { Artisan::call('migrate:refresh'); Artisan::call('db:seed'); } }