File tree Expand file tree Collapse file tree 5 files changed +16
-13
lines changed Expand file tree Collapse file tree 5 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 37
37
},
38
38
"autoload-dev" : {
39
39
"classmap" : [
40
- " tests/database/factories"
40
+ " tests/database/factories" ,
41
+ " tests/database/seeds"
41
42
],
42
43
"psr-4" : {
43
44
"GeneaLabs\\ LaravelModelCaching\\ Tests\\ " : " tests/"
Original file line number Diff line number Diff line change 11
11
stopOnFailure =" true"
12
12
>
13
13
<testsuites >
14
+ <testsuite name =" Setup" >
15
+ <directory >./tests/AlwaysRunFirstTest.php</directory >
16
+ </testsuite >
14
17
<testsuite name =" Feature" >
15
18
<directory suffix =" Test.php" >./tests/Feature</directory >
16
19
</testsuite >
Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ public function setUp() : void
10
10
{
11
11
parent ::setUp ();
12
12
13
+ $ this ->app ['config ' ]->set ('database.default ' , 'baseline ' );
14
+ $ this ->app ['config ' ]->set ('database.connections.baseline ' , [
15
+ 'driver ' => 'sqlite ' ,
16
+ "url " => null ,
17
+ 'database ' => __DIR__ . '/database/baseline.sqlite ' ,
18
+ 'prefix ' => '' ,
19
+ "foreign_key_constraints " => false ,
20
+ ]);
21
+
13
22
$ this ->createBaselineSqliteDatabase ();
14
23
15
24
$ this ->withFactories (__DIR__ . '/database/factories ' );
@@ -26,21 +35,11 @@ public function setUp() : void
26
35
->run ();
27
36
}
28
37
29
- protected function getEnvironmentSetUp ( $ app )
38
+ private function createBaselineSqliteDatabase ( )
30
39
{
31
- parent ::getEnvironmentSetUp ($ app );
32
-
33
- $ app ['config ' ]->set ('database.default ' , 'baseline ' );
34
- $ app ['config ' ]->set ('database.connections.baseline ' , [
35
- 'driver ' => 'sqlite ' ,
36
- "url " => null ,
37
- 'database ' => __DIR__ . '/database/baseline.sqlite ' ,
38
- 'prefix ' => '' ,
39
- "foreign_key_constraints " => false ,
40
- ]);
40
+ shell_exec ("cd " . __DIR__ . "/database && rm *.sqlite && touch baseline.sqlite " );
41
41
}
42
42
43
-
44
43
/** @test */
45
44
public function migrateAndInstallTheDatabase ()
46
45
{
You can’t perform that action at this time.
0 commit comments