Beispiel #1
0
 public function tearDown()
 {
     if ($this->useDatabase) {
         Artisan::call('migrate:reset');
     }
     parent::tearDown();
 }
Beispiel #2
0
 public function tearDown()
 {
     Mockery::close();
     //$this->truncateTablesDb();
     Artisan::call('migrate:reset');
     parent::tearDown();
 }
 public function tearDown()
 {
     parent::tearDown();
     Mockery::close();
     Test::clean();
     $this->dropDatabase();
 }
Beispiel #4
0
 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  */
 public function tearDown()
 {
     parent::tearDown();
     // delete copy original.
     //$original = __DIR__.'/../storage/database/testing.db';
     //unlink($original);
 }
Beispiel #5
0
 public function tearDown()
 {
     if ($this->useRealSQLiteDatabase) {
         $this->tearDownRealSQLiteDb();
     }
     return parent::tearDown();
 }
 public function setUp()
 {
     parent::setUp();
     // Don't forget this!
     $this->prepareForTests();
     $this->resetEvents();
 }
 public function tearDown()
 {
     if ($this->useDatabase) {
         $this->artisan('migrate:rollback');
     }
     parent::tearDown();
 }
Beispiel #8
0
 public function tearDown()
 {
     $this->beforeApplicationDestroyed(function () {
         DB::disconnect();
     });
     parent::tearDown();
 }
Beispiel #9
0
 public function setup()
 {
     parent::setUp();
     $this->artisan('migrate:reset');
     $this->artisan('migrate');
     $this->artisan('db:seed');
 }
Beispiel #10
0
 public function setUp()
 {
     parent::setUp();
     // Avoid using external service to fetch quotes
     $rate = new \Swap\Model\Rate(1);
     \Swap::shouldReceive('quote')->andReturn($rate);
 }
 public function __construct()
 {
     parent::setUp();
     $this->user = factory(\App\User::class)->create();
     $this->administratorFactory = new \Larapress\Admin\Database\Factories\AdministratorFactory(Faker\Factory::create(), \Carbon\Carbon::create());
     $this->administrator = $this->administratorFactory->administrator($this->user->id)->save();
 }
Beispiel #12
0
 /**
  * Préparation avant les tests
  */
 public function setUp()
 {
     parent::setUp();
     Artisan::call('migrate');
     $this->seed();
     Mail::pretend(true);
 }
Beispiel #13
0
 public function setUp()
 {
     parent::setUp();
     $this->app['config']->set('database.default', 'testing');
     $a = __DIR__ . '/../src/migrations';
     $this->app['config']->set('database.connections.testing', array('driver' => 'sqlite', 'database' => ':memory:', 'prefix' => ''));
     $this->migrate();
 }
 public function setup()
 {
     parent::setUp();
     Session::start();
     //enable filters as filters are disabled by default
     Route::enableFilters();
     $this->prepareForTests();
 }
 /**
  * Call api route as guest, or authenticated user.
  * @param $method
  * @param $uri
  * @param array $data
  * @param User $user
  * @return $this
  */
 protected function callApi($method, $uri, array $data = [], User $user = null)
 {
     $headers = [];
     if ($user instanceof User) {
         $headers = ['Authorization' => 'Bearer ' . $user->api_token];
     }
     return parent::json($method, 'api' . $uri, $data, $headers);
 }
 public function setUp()
 {
     parent::setUp();
     $this->app['config']->set('vjroby-laravel-nonce::database_type', $this->databaseType);
     $this->app['config']->set('vjroby-laravel-nonce::dynamodb_table_name', $this->dynamoDBtableName);
     $this->app['config']->set('vjroby-laravel-nonc::.dynamodb_table_region', $this->dynamoRegion);
     $this->mockAws();
 }
Beispiel #17
0
 public function setUp()
 {
     parent::setUp();
     // Don't forget this!
     $this->redis = \RedisLV4::connection();
     $this->redis->flushall();
     $this->prepareForTests();
 }
Beispiel #18
0
 public function asUser($model)
 {
     if (!$model instanceof Eloquent) {
         $rep = App::make("HOFB\\Users\\UserRepository");
         $model = $rep->getByHash($model);
     }
     parent::be($model);
 }
Beispiel #19
0
 public function setUp()
 {
     parent::setUp();
     $this->app['config']->set('database.default', 'sqlite');
     $this->app['config']->set('database.connections.sqlite.database', ':memory:');
     $this->faker = \Faker\Factory::create();
     $this->migrateDatabase();
 }
Beispiel #20
0
 public function setUp()
 {
     parent::setUp();
     $user = factory('Tsny\\Models\\User')->create();
     $this->be($user);
     //        Artisan::call('migrate:refresh');
     //        Artisan::call('db:seed', ['--class'=>'TestSeeder']);
 }
Beispiel #21
0
 public function call($method, $uri, $parameters = [], $files = [], $server = [], $content = null, $changeHistory = true)
 {
     try {
         return parent::call($method, $uri, $parameters, $files, $server, $content, $changeHistory);
     } catch (HttpExceptionInterface $ex) {
         return Response::make('Http Exception', $ex->getStatusCode());
     }
 }
Beispiel #22
0
 public function setUp()
 {
     parent::setUp();
     @unlink(base_path('storage/database.sqlite'));
     @copy(base_path('storage/database.sqlite.blank'), base_path('storage/database.sqlite'));
     Artisan::call('vendor:publish', ['--tag' => ['migrations']]);
     Artisan::call('migrate');
     Artisan::call('db:seed', ['--class' => 'UserModuleSeeder']);
 }
Beispiel #23
0
 /**
  * Set up function for all tests
  *
  */
 public function setUp()
 {
     parent::setUp();
     if ($this->useDatabase) {
         $this->setUpDb();
     }
     // To test auth, we must re-enable filters on the routes
     // By default, filters are disabled in testing
     Route::enableFilters();
 }
Beispiel #24
0
 /**
  * Setup the test environment.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     // Ideally we'd like to bypass the middleware when testing, however
     // this breaks Former because of it's hard dependency on sessions. With
     // middleware enabled however, forms check for a valid CSRF token.
     // This replaces the app's CSRF middleware with and override that exempts
     // all routes from CSRF protection.
     $this->app->instance('NeonTsunami\\Http\\Middleware\\VerifyCsrfToken', $this->app->make('VerifyCsrfToken'));
 }
 /**
  *
  */
 public function setUp()
 {
     parent::setUp();
     if (static::$migrated) {
         return;
     }
     /** @var \Illuminate\Contracts\Console\Kernel $artisan */
     $artisan = app(Illuminate\Contracts\Console\Kernel::class);
     $artisan->call('migrate');
     static::$migrated = true;
 }
 public function setUp()
 {
     Illuminate\Foundation\Testing\TestCase::setUp();
     Artisan::call('migrate', array('--package' => 'cartalyst\\sentry'));
     // 		Artisan::call('migrate');
     Artisan::call('migrate', array('--package' => 'rtconner\\laravel-addresses'));
     Artisan::call('db:seed', array('--class' => 'Conner\\Addresses\\DatabaseSeeder'));
     $user = new \Cartalyst\Sentry\Users\Eloquent\User();
     $user->id = 1;
     \Sentry::setUser($user);
 }
 /**
  * Set Up the Application, it will install it.
  */
 public function setUp()
 {
     parent::setUp();
     if (!file_exists(storage_path('database.sqlite'))) {
         $database = fopen(storage_path('database.sqlite'), "w");
         fclose($database);
     }
     $this->beforeApplicationDestroyed(function () {
         unlink(storage_path('database.sqlite'));
     });
 }
 public function setUp()
 {
     parent::setUp();
     $this->artisan('migrate');
     $this->beforeApplicationDestroyed(function () {
         $this->artisan('migrate:rollback');
     });
     //Create an empty file for the sqlite db to go into
     //exec('rm ' . storage_path('database.sqlite'));
     //exec('touch ' . storage_path('database.sqlite'));
 }
Beispiel #29
0
 public function setUp()
 {
     parent::setUp();
     putenv('DB_CONNECTION=sqlite_testing');
     if (!Schema::hasTable('migrations')) {
         Artisan::call('mage2:migrate');
         Artisan::call('db:seed');
         $this->setupAdminUserAndWebsite();
     }
     //Artisan::call('db:seed');
 }
Beispiel #30
0
 public function setUp()
 {
     parent::setUp();
     Config::set('database.default', 'sqlite');
     Config::set('database.sqlite.database', ':memory:');
     Schema::dropIfExists('demos');
     Schema::create('demos', function ($table) {
         $table->increments('id');
         $table->string('name');
     });
     Demo::insert(array('name' => 'demo datatables'));
 }