Advertisement
Guest User

Untitled

a guest
Jan 16th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1. namespace Madserver\Tests;
  2.  
  3. class TestCase extends \Illuminate\Foundation\Testing\TestCase {
  4.  
  5.     /**
  6.      * Default preparation for each test
  7.      */
  8.     public function setUp()
  9.     {
  10.         parent::setUp();
  11.        
  12.         $this->prepareForTests();
  13.     }
  14.  
  15.     /**
  16.      * Creates the application.
  17.      *
  18.      * @return Symfony\Component\HttpKernel\HttpKernelInterface
  19.      */
  20.     public function createApplication()
  21.     {
  22.         $unitTesting = true;
  23.  
  24.         $testEnvironment = 'testing';
  25.  
  26.         return require __DIR__.'/../../bootstrap/start.php';
  27.     }
  28.  
  29.     /**
  30.      * Migrates the database and set the mailer to 'pretend'.
  31.      * This will cause the tests to run quickly.
  32.      */
  33.     private function prepareForTests()
  34.     {
  35.         \Artisan::call('migrate');
  36.         \Mail::pretend(true);
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement