Skip to content

Commit

Permalink
Merge pull request #62 from stackkit/bugfix/failing-test
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
marickvantuil committed Apr 25, 2024
2 parents 54753d4 + c4161ba commit ab25d62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"composer update laravel/framework:10.* orchestra/testbench:8.* nunomaduro/collision:7.* --with-all-dependencies"
],
"test": [
"testbench workbench:create-sqlite-db",
"testbench package:test"
],
"post-autoload-dump": [
Expand Down
15 changes: 9 additions & 6 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Tests;

use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Orchestra\Testbench\Concerns\WithWorkbench;
Expand All @@ -13,7 +13,7 @@ class TestCase extends \Orchestra\Testbench\TestCase
{
protected $invalid;

use LazilyRefreshDatabase;
use RefreshDatabase;
use WithWorkbench;

public function setUp(): void
Expand Down Expand Up @@ -69,20 +69,23 @@ protected function getEnvironmentSetUp($app)
'driver' => $driver,
...match ($driver) {
'sqlite' => [
'database' => ':memory:',
'database' => database_path('database.sqlite'),
],
'mysql' => [
'host' => '127.0.0.1',
'port' => 3307,
'database' => 'test',
'username' => 'test',
'password' => 'test',
],
'pgsql' => [
'host' => '127.0.0.1',
'port' => 5432,
'database' => 'test',
'username' => 'test',
'password' => 'test',
],
},
'database' => 'test',
'username' => 'test',
'password' => 'test',
]);

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

0 comments on commit ab25d62

Please sign in to comment.