Skip to content

Commit 8b35c8e

Browse files
committed
formatting
1 parent 623dccb commit 8b35c8e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/Illuminate/Foundation/Testing/RefreshDatabase.php

+18-18
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,26 @@ protected function usingInMemoryDatabase()
3030
return config("database.connections.$default.database") === ':memory:';
3131
}
3232

33-
/**
34-
* Parameters used on refresh in-memory database.
35-
*
36-
* @return array
37-
*/
38-
protected function migrateCommandParameters()
39-
{
40-
return [];
41-
}
42-
4333
/**
4434
* Refresh the in-memory database.
4535
*
4636
* @return void
4737
*/
4838
protected function refreshInMemoryDatabase()
4939
{
50-
$this->artisan('migrate', $this->migrateCommandParameters());
40+
$this->artisan('migrate', $this->migrateUsing());
5141

5242
$this->app[Kernel::class]->setArtisan(null);
5343
}
5444

5545
/**
56-
* Parameters used on migrate fresh conventional database.
46+
* The parameters that should be used when running "migrate".
5747
*
5848
* @return array
5949
*/
60-
protected function migrateFreshCommandParameters()
50+
protected function migrateUsing()
6151
{
62-
return [
63-
'--drop-views' => $this->shouldDropViews(),
64-
'--drop-types' => $this->shouldDropTypes(),
65-
];
52+
return [];
6653
}
6754

6855
/**
@@ -73,7 +60,7 @@ protected function migrateFreshCommandParameters()
7360
protected function refreshTestDatabase()
7461
{
7562
if (! RefreshDatabaseState::$migrated) {
76-
$this->artisan('migrate:fresh', $this->migrateFreshCommandParameters());
63+
$this->artisan('migrate:fresh', $this->freshMigrateUsing());
7764

7865
$this->app[Kernel::class]->setArtisan(null);
7966

@@ -83,6 +70,19 @@ protected function refreshTestDatabase()
8370
$this->beginDatabaseTransaction();
8471
}
8572

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+
8686
/**
8787
* Begin a database transaction on the testing database.
8888
*

0 commit comments

Comments
 (0)