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
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
php artisan jwt:secret
......@@ -113,6 +110,10 @@ You can now access the server at http://localhost:8000
php artisan jwt:secret
php artisan vendor:publish --tag=lfm_public
## Please note
- To run test cases, add SQLite support to your php
## Logging In
`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
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
......@@ -53,8 +51,6 @@ class AppServiceProvider extends ServiceProvider
/**
* Register any application services.
*
* @return void
*/
public function register()
{
......
This diff is collapsed.
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
......@@ -32,27 +31,27 @@ return [
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => true,
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'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
'engine' => null,
'modes' => [
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'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
'engine' => null,
'modes' => [
// "ONLY_FULL_GROUP_BY",
// "STRICT_TRANS_TABLES",
// "NO_ZERO_IN_DATE",
......@@ -64,18 +63,17 @@ return [
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
'sslmode' => 'prefer',
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
'sslmode' => 'prefer',
],
],
/*
......@@ -103,16 +101,13 @@ return [
*/
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
],
];
This diff is collapsed.
......@@ -31,5 +31,6 @@
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
<env name="SCOUT_DRIVER" value="null"/>
<env name="TELESCOPE_ENABLED" value="false"/>
</php>
</phpunit>
......@@ -54,6 +54,11 @@ abstract class BrowserKitTestCase extends BaseTestCase
{
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');
// Set up the database
......
......@@ -58,6 +58,11 @@ abstract class TestCase extends BaseTestCase
{
parent::setUp();
if (config('database.default') == 'sqlite') {
$db = app()->make('db');
$db->connection()->getPdo()->exec('pragma foreign_keys=0');
}
$this->withoutExceptionHandling();
// 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