Commit edef02f2 authored by Viral Solani's avatar Viral Solani

misc changes in test suit.

parent 6f726ff9
...@@ -61,9 +61,6 @@ Generate a new application key ...@@ -61,9 +61,6 @@ Generate a new application key
php artisan key:generate php artisan key:generate
Generate a new JWT secret key (If you want to use API)
php artisan jwt:secret
Generate a new JWT authentication secret key Generate a new JWT authentication secret key
php artisan jwt:secret php artisan jwt:secret
...@@ -113,6 +110,10 @@ You can now access the server at http://localhost:8000 ...@@ -113,6 +110,10 @@ You can now access the server at http://localhost:8000
php artisan jwt:secret php artisan jwt:secret
php artisan vendor:publish --tag=lfm_public php artisan vendor:publish --tag=lfm_public
## Please note
- To run test cases, add SQLite support to your php
## Logging In ## Logging In
`php artisan db:seed` adds three users with respective roles. The credentials are as follows: `php artisan db:seed` adds three users with respective roles. The credentials are as follows:
......
This diff is collapsed.
...@@ -10,8 +10,6 @@ class AppServiceProvider extends ServiceProvider ...@@ -10,8 +10,6 @@ class AppServiceProvider extends ServiceProvider
{ {
/** /**
* Bootstrap any application services. * Bootstrap any application services.
*
* @return void
*/ */
public function boot() public function boot()
{ {
...@@ -53,8 +51,6 @@ class AppServiceProvider extends ServiceProvider ...@@ -53,8 +51,6 @@ class AppServiceProvider extends ServiceProvider
/** /**
* Register any application services. * Register any application services.
*
* @return void
*/ */
public function register() public function register()
{ {
......
This diff is collapsed.
<?php <?php
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Database Connection Name | Default Database Connection Name
...@@ -32,27 +31,27 @@ return [ ...@@ -32,27 +31,27 @@ return [
*/ */
'connections' => [ 'connections' => [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')), 'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '', 'foreign_key_constraints' => true,
'prefix' => '',
], ],
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'), 'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'), 'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''), 'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => false, //If you set strict to true, then make sure to enable which modes you want to enable by looking at 'modes' key in this config 'strict' => false, //If you set strict to true, then make sure to enable which modes you want to enable by looking at 'modes' key in this config
'engine' => null, 'engine' => null,
'modes' => [ 'modes' => [
// "ONLY_FULL_GROUP_BY", // "ONLY_FULL_GROUP_BY",
// "STRICT_TRANS_TABLES", // "STRICT_TRANS_TABLES",
// "NO_ZERO_IN_DATE", // "NO_ZERO_IN_DATE",
...@@ -64,18 +63,17 @@ return [ ...@@ -64,18 +63,17 @@ return [
], ],
'pgsql' => [ 'pgsql' => [
'driver' => 'pgsql', 'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'), 'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'), 'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'schema' => 'public', 'schema' => 'public',
'sslmode' => 'prefer', 'sslmode' => 'prefer',
], ],
], ],
/* /*
...@@ -103,16 +101,13 @@ return [ ...@@ -103,16 +101,13 @@ return [
*/ */
'redis' => [ 'redis' => [
'client' => 'predis', 'client' => 'predis',
'default' => [ 'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => 0, 'database' => 0,
], ],
], ],
]; ];
This diff is collapsed.
...@@ -31,5 +31,6 @@ ...@@ -31,5 +31,6 @@
<env name="SESSION_DRIVER" value="array"/> <env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/> <env name="QUEUE_DRIVER" value="sync"/>
<env name="SCOUT_DRIVER" value="null"/> <env name="SCOUT_DRIVER" value="null"/>
<env name="TELESCOPE_ENABLED" value="false"/>
</php> </php>
</phpunit> </phpunit>
...@@ -54,6 +54,11 @@ abstract class BrowserKitTestCase extends BaseTestCase ...@@ -54,6 +54,11 @@ abstract class BrowserKitTestCase extends BaseTestCase
{ {
parent::setUp(); parent::setUp();
if (config('database.default') == 'sqlite') {
$db = app()->make('db');
$db->connection()->getPdo()->exec('pragma foreign_keys=0');
}
$this->baseUrl = config('app.url', 'http://localhost:8000'); $this->baseUrl = config('app.url', 'http://localhost:8000');
// Set up the database // Set up the database
......
...@@ -58,6 +58,11 @@ abstract class TestCase extends BaseTestCase ...@@ -58,6 +58,11 @@ abstract class TestCase extends BaseTestCase
{ {
parent::setUp(); parent::setUp();
if (config('database.default') == 'sqlite') {
$db = app()->make('db');
$db->connection()->getPdo()->exec('pragma foreign_keys=0');
}
$this->withoutExceptionHandling(); $this->withoutExceptionHandling();
// Set up the database // Set up the database
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment