Skip to content

Commit f4b1dc6

Browse files
driesvintstaylorotwell
authored andcommitted
[6.x] Implement integration test and in-memory DB (laravel#5169)
* Use in-memory DB for testing * Extend from PHPUnit test case for unit tests
1 parent 9b66432 commit f4b1dc6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

phpunit.xml

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
<server name="APP_ENV" value="testing"/>
2929
<server name="BCRYPT_ROUNDS" value="4"/>
3030
<server name="CACHE_DRIVER" value="array"/>
31+
<server name="DB_CONNECTION" value="sqlite"/>
32+
<server name="DB_DATABASE" value=":memory:"/>
3133
<server name="MAIL_DRIVER" value="array"/>
3234
<server name="QUEUE_CONNECTION" value="sync"/>
3335
<server name="SESSION_DRIVER" value="array"/>

tests/Unit/ExampleTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
namespace Tests\Unit;
44

5-
use Illuminate\Foundation\Testing\RefreshDatabase;
6-
use Tests\TestCase;
5+
use PHPUnit\Framework\TestCase;
76

87
class ExampleTest extends TestCase
98
{

0 commit comments

Comments
 (0)