From 00a77ddc33c6202833a54408c90510674f2c0b9f Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 24 Nov 2020 00:40:52 +1100 Subject: [PATCH 1/2] Fix local testing, fix test class name --- config/database.php | 13 +++++++++++++ phpunit.xml | 3 +-- tests/Api/UserControllerTest.php | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/config/database.php b/config/database.php index b42d9b3..b6cba65 100644 --- a/config/database.php +++ b/config/database.php @@ -91,6 +91,19 @@ 'prefix_indexes' => true, ], + 'test' => [ + 'driver' => 'pgsql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE_TEST', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + 'schema' => 'public', + 'sslmode' => 'prefer' + ] ], /* diff --git a/phpunit.xml b/phpunit.xml index 7d57c99..17d6e2c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -35,8 +35,7 @@ - - + diff --git a/tests/Api/UserControllerTest.php b/tests/Api/UserControllerTest.php index bb340be..fd13614 100644 --- a/tests/Api/UserControllerTest.php +++ b/tests/Api/UserControllerTest.php @@ -5,7 +5,7 @@ use Tests\ApiTestCase; use App\Models\User; -class UserTest extends ApiTestCase +class UserControllerTest extends ApiTestCase { public function testGetAll() { $jsonResponse = $this->actingAsAdmin()->json('GET', '/users'); From 01dbf5c04a0ee9d6721ecdd7405470babdaa14d0 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 24 Nov 2020 00:41:12 +1100 Subject: [PATCH 2/2] Apply fixes from StyleCI (#48) --- config/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/database.php b/config/database.php index b6cba65..c9fd988 100644 --- a/config/database.php +++ b/config/database.php @@ -102,8 +102,8 @@ 'prefix' => '', 'prefix_indexes' => true, 'schema' => 'public', - 'sslmode' => 'prefer' - ] + 'sslmode' => 'prefer', + ], ], /*