1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- /*
- * This file is part of ibrand/setting.
- *
- * (c) iBrand <https://www.ibrand.cc>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- use Illuminate\Foundation\Testing\DatabaseMigrations;
- abstract class BaseTest extends Orchestra\Testbench\TestCase
- {
- use DatabaseMigrations;
- protected function getEnvironmentSetUp($app)
- {
- // Setup default database to use sqlite :memory:
- $app['config']->set('database.default', 'testbench');
- $app['config']->set('database.connections.testbench', [
- 'driver' => 'sqlite',
- 'database' => ':memory:',
- 'prefix' => '',
- ]);
- }
- protected function loadMigrationsFrom($app)
- {
- $this->artisan('migrate', ['--database' => 'testbench']);
- }
- protected function getPackageProviders($app)
- {
- return [iBrand\Component\Setting\ServiceProvider::class];
- }
- protected function setUp()
- {
- parent::setUp(); // TODO: Change the autogenerated stub
- $this->loadMigrationsFrom(__DIR__.'/database');
- }
- }
|