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 3737 },
3838 "autoload-dev" : {
3939 "classmap" : [
40- " tests/database/factories"
40+ " tests/database/factories" ,
41+ " tests/database/seeds"
4142 ],
4243 "psr-4" : {
4344 "GeneaLabs\\ LaravelModelCaching\\ Tests\\ " : " tests/"
Original file line number Diff line number Diff line change 1111 stopOnFailure =" true"
1212>
1313 <testsuites >
14+ <testsuite name =" Setup" >
15+ <directory >./tests/AlwaysRunFirstTest.php</directory >
16+ </testsuite >
1417 <testsuite name =" Feature" >
1518 <directory suffix =" Test.php" >./tests/Feature</directory >
1619 </testsuite >
Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ public function setUp() : void
1010 {
1111 parent ::setUp ();
1212
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+
1322 $ this ->createBaselineSqliteDatabase ();
1423
1524 $ this ->withFactories (__DIR__ . '/database/factories ' );
@@ -26,21 +35,11 @@ public function setUp() : void
2635 ->run ();
2736 }
2837
29- protected function getEnvironmentSetUp ( $ app )
38+ private function createBaselineSqliteDatabase ( )
3039 {
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 " );
4141 }
4242
43-
4443 /** @test */
4544 public function migrateAndInstallTheDatabase ()
4645 {
You can’t perform that action at this time.
0 commit comments