forked from mongodb/laravel-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestCase.php
68 lines (58 loc) · 2.08 KB
/
TestCase.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
class TestCase extends Orchestra\Testbench\TestCase
{
/**
* Get application providers.
*
* @param \Illuminate\Foundation\Application $app
*
* @return array
*/
protected function getApplicationProviders($app)
{
$providers = parent::getApplicationProviders($app);
unset($providers[array_search('Illuminate\Auth\Passwords\PasswordResetServiceProvider', $providers)]);
return $providers;
}
/**
* Get package providers.
*
* @param \Illuminate\Foundation\Application $app
* @return array
*/
protected function getPackageProviders($app)
{
return [
Jenssegers\Mongodb\MongodbServiceProvider::class,
Jenssegers\Mongodb\Auth\PasswordResetServiceProvider::class,
Jenssegers\Mongodb\Validation\ValidationServiceProvider::class
];
}
/**
* Define environment setup.
*
* @param Illuminate\Foundation\Application $app
* @return void
*/
protected function getEnvironmentSetUp($app)
{
// reset base path to point to our package's src directory
//$app['path.base'] = __DIR__ . '/../src';
$config = require 'config/database.php';
$app['config']->set('app.key', 'ZsZewWyUJ5FsKp9lMwv4tYbNlegQilM7');
$app['config']->set('database.default', 'mongodb');
$app['config']->set('database.connections.mysql', $config['connections']['mysql']);
$app['config']->set('database.connections.mongodb', $config['connections']['mongodb']);
$app['config']->set('database.connections.dsn_mongodb', $config['connections']['dsn_mongodb']);
$app['config']->set('auth.model', 'User');
$app['config']->set('auth.providers.users.model', 'User');
$app['config']->set('cache.driver', 'array');
$app['config']->set('queue.default', 'database');
$app['config']->set('queue.connections.database', [
'driver' => 'mongodb',
'table' => 'jobs',
'queue' => 'default',
'expire' => 60,
]);
}
}