Skip to content

Commit 2d09bd8

Browse files
committed
[fix] base test class
- update base test class to adhere with Laravel 7.0 changes - updates base test class to specify test environment
1 parent 7a1ba24 commit 2d09bd8

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/TestCase.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Collective\Html\FormFacade;
66
use Collective\Html\HtmlFacade;
77
use Collective\Html\HtmlServiceProvider;
8+
use Throwable;
89
use Exception;
910
use Illuminate\Contracts\Debug\ExceptionHandler;
1011
use Illuminate\Support\Facades\Auth;
@@ -45,6 +46,16 @@ public function setUp(): void
4546
Totem::auth($auth);
4647
}
4748

49+
protected function getEnvironmentSetUp($app)
50+
{
51+
$app['config']->set('database.default', 'testing');
52+
$app['config']->set('database.connections.testing', [
53+
'driver' => 'sqlite',
54+
'database' => ':memory:',
55+
'prefix' => '',
56+
]);
57+
}
58+
4859
protected function getPackageAliases($app)
4960
{
5061
return [
@@ -71,11 +82,11 @@ public function __construct()
7182
{
7283
}
7384

74-
public function report(Exception $e)
85+
public function report(Throwable $e)
7586
{
7687
}
7788

78-
public function render($request, Exception $e)
89+
public function render($request, Throwable $e)
7990
{
8091
throw $e;
8192
}

0 commit comments

Comments
 (0)