-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTestCase.php
60 lines (51 loc) · 1.63 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
<?php
namespace Artistan\ZeroNullDates\Tests;
use Orchestra\Testbench\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
/**
* Get package providers. At a minimum this is the package being tested, but also
* would include packages upon which our package depends, e.g. Cartalyst/Sentry
* In a normal app environment these would be added to the 'providers' array in
* the config/app.php file.
*
* @param \Illuminate\Foundation\Application $app
*
* @return array
*/
protected function getPackageProviders($app)
{
return [
\Artistan\ZeroNullDates\Provider::class,
];
}
/**
* Get package aliases. In a normal app environment these would be added to
* the 'aliases' array in the config/app.php file. If your package exposes an
* aliased facade, you should add the alias here, along with aliases for
* facades upon which your package depends, e.g. Cartalyst/Sentry.
*
* @param \Illuminate\Foundation\Application $app
*
* @return array
*/
protected function getPackageAliases($app)
{
return [
"ZeroNullDates" => "Artistan\ZeroNullDates\Facade",
];
}
/**
* Setup the test environment.
*/
public function setUp()
{
parent::setUp();
$this->artisan('migrate:reset');
$this->loadLaravelMigrations();
$this->withFactories(realpath(__DIR__.'/Database/factories'));
$this->loadMigrationsFrom(realpath(__DIR__.'/Database/migrations'));
$this->seed('UserTableSeeder');
}
}