@@ -30,39 +30,26 @@ protected function usingInMemoryDatabase()
30
30
return config ("database.connections. $ default.database " ) === ':memory: ' ;
31
31
}
32
32
33
- /**
34
- * Parameters used on refresh in-memory database.
35
- *
36
- * @return array
37
- */
38
- protected function migrateCommandParameters ()
39
- {
40
- return [];
41
- }
42
-
43
33
/**
44
34
* Refresh the in-memory database.
45
35
*
46
36
* @return void
47
37
*/
48
38
protected function refreshInMemoryDatabase ()
49
39
{
50
- $ this ->artisan ('migrate ' , $ this ->migrateCommandParameters ());
40
+ $ this ->artisan ('migrate ' , $ this ->migrateUsing ());
51
41
52
42
$ this ->app [Kernel::class]->setArtisan (null );
53
43
}
54
44
55
45
/**
56
- * Parameters used on migrate fresh conventional database .
46
+ * The parameters that should be used when running "migrate" .
57
47
*
58
48
* @return array
59
49
*/
60
- protected function migrateFreshCommandParameters ()
50
+ protected function migrateUsing ()
61
51
{
62
- return [
63
- '--drop-views ' => $ this ->shouldDropViews (),
64
- '--drop-types ' => $ this ->shouldDropTypes (),
65
- ];
52
+ return [];
66
53
}
67
54
68
55
/**
@@ -73,7 +60,7 @@ protected function migrateFreshCommandParameters()
73
60
protected function refreshTestDatabase ()
74
61
{
75
62
if (! RefreshDatabaseState::$ migrated ) {
76
- $ this ->artisan ('migrate:fresh ' , $ this ->migrateFreshCommandParameters ());
63
+ $ this ->artisan ('migrate:fresh ' , $ this ->freshMigrateUsing ());
77
64
78
65
$ this ->app [Kernel::class]->setArtisan (null );
79
66
@@ -83,6 +70,19 @@ protected function refreshTestDatabase()
83
70
$ this ->beginDatabaseTransaction ();
84
71
}
85
72
73
+ /**
74
+ * The parameters that should be used when running "migrate:fresh".
75
+ *
76
+ * @return array
77
+ */
78
+ protected function freshMigrateUsing ()
79
+ {
80
+ return [
81
+ '--drop-views ' => $ this ->shouldDropViews (),
82
+ '--drop-types ' => $ this ->shouldDropTypes (),
83
+ ];
84
+ }
85
+
86
86
/**
87
87
* Begin a database transaction on the testing database.
88
88
*
0 commit comments