Skip to content

Commit 8405c6a

Browse files
committed
switch to tmp
1 parent c686d11 commit 8405c6a

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/TestCase.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,8 @@ protected function setUp(): void
2424

2525
$this->db = $db = new DB;
2626

27-
// define database
28-
//$database = __DIR__ . '/tests.sqlite';
29-
$database = 'tests.sqlite';
30-
31-
// remove database
32-
file_exists($database) ? unlink($database) : null;
33-
34-
// create database
35-
touch($database);
27+
// grab database
28+
$database = $this->app['config']['database']['connections']['sqlite']['database'];
3629

3730
// setup connection
3831
$db->addConnection([
@@ -111,7 +104,8 @@ public function getEnvironmentSetUp($app)
111104
$app['config']->set('database.default', 'sqlite');
112105
$app['config']->set('database.connections.sqlite', [
113106
'driver' => 'sqlite',
114-
'database' => 'tests.sqlite',
107+
//'database' => 'tests/tests.sqlite',
108+
'database' => tempnam(sys_get_temp_dir(), 'LaravelLivewireTables'),
115109
'prefix' => '',
116110
]);
117111
}

0 commit comments

Comments
 (0)