Skip to content

Commit 1e86176

Browse files
author
Jovert Lota Palonpon
committed
[Testing] Updated configurations
1 parent 2bad006 commit 1e86176

File tree

4 files changed

+35
-19
lines changed

4 files changed

+35
-19
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ PUSHER_APP_CLUSTER=mt1
4040
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
4141
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
4242

43+
TELESCOPE_ENABLED=true
44+
4345
JWT_SECRET=noclue
4446
JWT_TTL=60
4547
JWT_REFRESH_TTL=20160

.env.testing

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
APP_ENV=testing
2+
BCRYPT_ROUNDS=4
3+
CACHE_DRIVER=array
4+
MAIL_DRIVER=array
5+
QUEUE_CONNECTION=database
6+
SESSION_DRIVER=array
7+
DB_CONNECTION=sqlite
8+
DB_DATABASE=:memory:
9+
10+
TELESCOPE_ENABLED=false
11+
12+
JWT_SECRET=tuHlDtSr7DO4JxxmjfuddNHOdgZLhgVC
13+
JWT_TTL=240
14+
JWT_REFRESH_TTL=20160
15+
JWT_ALGO=HS256

phpunit.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false">
1111
<testsuites>
1212
<testsuite name="Unit">
1313
<directory suffix="Test.php">./tests/Unit</directory>
@@ -23,13 +23,13 @@
2323
</whitelist>
2424
</filter>
2525
<php>
26-
<env name="APP_ENV" value="testing"/>
27-
<env name="BCRYPT_ROUNDS" value="4"/>
28-
<env name="CACHE_DRIVER" value="array"/>
29-
<env name="MAIL_DRIVER" value="array"/>
30-
<env name="QUEUE_CONNECTION" value="sync"/>
31-
<env name="SESSION_DRIVER" value="array"/>
32-
<env name="DB_CONNECTION" value="sqlite" />
33-
<env name="DB_DATABASE" value=":memory:" />
26+
<server name="APP_ENV" value="testing"/>
27+
<server name="BCRYPT_ROUNDS" value="4"/>
28+
<server name="CACHE_DRIVER" value="array"/>
29+
<server name="MAIL_DRIVER" value="array"/>
30+
<server name="QUEUE_CONNECTION" value="sync"/>
31+
<server name="SESSION_DRIVER" value="array"/>
32+
<server name="DB_CONNECTION" value="sqlite" />
33+
<server name="DB_DATABASE" value=":memory:" />
3434
</php>
3535
</phpunit>

tests/Feature/UsersTest.php renamed to tests/Feature/Api/UsersTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<?php
22

3-
namespace Tests\Feature;
3+
namespace Tests\Feature\Api;
44

55
use App\User;
66
use Tests\TestCase;
77
use Illuminate\Foundation\Testing\WithFaker;
88
use Illuminate\Foundation\Testing\RefreshDatabase;
9-
use Illuminate\Foundation\Testing\DatabaseTransactions;
109

1110
class UsersTest extends TestCase
1211
{
13-
use WithFaker, DatabaseTransactions;
12+
use WithFaker, RefreshDatabase;
1413

1514
/** @test */
1615
public function a_user_can_list_users()

0 commit comments

Comments
 (0)