File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/Illuminate/Testing/Concerns Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ trait TestDatabases
1919 */
2020 protected static $ schemaIsUpToDate = false ;
2121
22+ /**
23+ * The root database name prior to concatenating the token.
24+ *
25+ * @var null|string
26+ */
27+ protected static $ originalDatabaseName = null ;
28+
2229 /**
2330 * Boot a test database.
2431 *
@@ -186,6 +193,12 @@ protected function switchToDatabase($database)
186193 */
187194 protected function testDatabase ($ database )
188195 {
196+ if (! isset (self ::$ originalDatabaseName )) {
197+ self ::$ originalDatabaseName = $ database ;
198+ } else {
199+ $ database = self ::$ originalDatabaseName ;
200+ }
201+
189202 $ token = ParallelTesting::token ();
190203
191204 return "{$ database }_test_ {$ token }" ;
You can’t perform that action at this time.
0 commit comments