Use native fs functions for bootstrapping tests

This commit is contained in:
Pig Fang 2019-12-24 23:37:57 +08:00
parent 78ae974e7a
commit b0435351fa
2 changed files with 4 additions and 6 deletions

View File

@ -27,9 +27,8 @@ class BrowserKitTestCase extends TestCase
Artisan::call('migrate:refresh');
$files = $app->make('files');
if (!$files->exists(storage_path('install.lock'))) {
$files->put(storage_path('install.lock'), '');
if (file_exists(storage_path('install.lock'))) {
file_put_contents(storage_path('install.lock'), '');
}
return $app;

View File

@ -26,9 +26,8 @@ class TestCase extends \Illuminate\Foundation\Testing\TestCase
Artisan::call('migrate:refresh');
$files = $app->make('files');
if (!$files->exists(storage_path('install.lock'))) {
$files->put(storage_path('install.lock'), '');
if (file_exists(storage_path('install.lock'))) {
file_put_contents(storage_path('install.lock'), '');
}
return $app;