-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathVuetableTestCase.php
43 lines (36 loc) · 1023 Bytes
/
VuetableTestCase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Vuetable\Tests;
use Orchestra\Testbench\TestCase;
class VuetableTestCase extends TestCase
{
protected function getPackageProviders($app)
{
return ['Vuetable\VuetableServiceProvider'];
}
protected function getPackageAliases($app)
{
return [
'Vuetable' => 'Vuetable\VuetableFacade'
];
}
protected function getEnvironmentSetUp($app)
{
$app['config']->set('database.default', 'testing');
$app['config']->set('database.connections.testing', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
}
public function migrate()
{
$migrations = [
\Vuetable\Tests\Migrations\UsersMigration::class,
\Vuetable\Tests\Migrations\RolesMigration::class,
\Vuetable\Tests\Migrations\CarsMigration::class,
];
foreach ($migrations as $migration) {
(new $migration)->up();
}
}
}