Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ab25d62

Browse files
authoredApr 25, 2024
Merge pull request #62 from stackkit/bugfix/failing-test
Fix
2 parents 54753d4 + c4161ba commit ab25d62

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
 

‎composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"composer update laravel/framework:10.* orchestra/testbench:8.* nunomaduro/collision:7.* --with-all-dependencies"
5050
],
5151
"test": [
52+
"testbench workbench:create-sqlite-db",
5253
"testbench package:test"
5354
],
5455
"post-autoload-dump": [

‎tests/TestCase.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Tests;
44

5-
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
5+
use Illuminate\Foundation\Testing\RefreshDatabase;
66
use Illuminate\Mail\Mailables\Content;
77
use Illuminate\Mail\Mailables\Envelope;
88
use Orchestra\Testbench\Concerns\WithWorkbench;
@@ -13,7 +13,7 @@ class TestCase extends \Orchestra\Testbench\TestCase
1313
{
1414
protected $invalid;
1515

16-
use LazilyRefreshDatabase;
16+
use RefreshDatabase;
1717
use WithWorkbench;
1818

1919
public function setUp(): void
@@ -69,20 +69,23 @@ protected function getEnvironmentSetUp($app)
6969
'driver' => $driver,
7070
...match ($driver) {
7171
'sqlite' => [
72-
'database' => ':memory:',
72+
'database' => database_path('database.sqlite'),
7373
],
7474
'mysql' => [
7575
'host' => '127.0.0.1',
7676
'port' => 3307,
77+
'database' => 'test',
78+
'username' => 'test',
79+
'password' => 'test',
7780
],
7881
'pgsql' => [
7982
'host' => '127.0.0.1',
8083
'port' => 5432,
84+
'database' => 'test',
85+
'username' => 'test',
86+
'password' => 'test',
8187
],
8288
},
83-
'database' => 'test',
84-
'username' => 'test',
85-
'password' => 'test',
8689
]);
8790

8891
$app['config']->set('mail.driver', 'log');

0 commit comments

Comments
 (0)
Please sign in to comment.