This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'timezone' => env('APP_TIMEZONE', 'Asia/Manila') | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Jsdecena\Simpletdd\Tests; | |
use Illuminate\Foundation\Testing\DatabaseMigrations; | |
use Illuminate\Foundation\Application; | |
abstract class TestCase extends \Orchestra\Testbench\TestCase | |
{ | |
use DatabaseMigrations; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Jsdecena\SimpleTdd\Tests; | |
class ServiceProvider extends \Illuminate\Support\ServiceProvider | |
{ | |
/** | |
* Perform post-registration booting of services. | |
* | |
* @return void |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ================================ Current METHOD ==================================== // | |
/** | |
* Balance inquiry | |
* | |
* @param Request $request | |
* @return array|JsonResponse | |
* @throws Exception |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info: serving app on http://127.0.0.1:4000 | |
Database migrated successfully in 118 ms | |
User unit test | |
✓ it can make a user (114ms) | |
PASSED | |
total : 1 | |
passed : 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
/* | |
|-------------------------------------------------------------------------- | |
| Vow file | |
|-------------------------------------------------------------------------- | |
| | |
| The vow file is loaded before running your tests. This is the best place | |
| to hook operations `before` and `after` running the tests. | |
| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info: serving app on http://127.0.0.1:4000 | |
User unit test | |
✖ it can make a user (202ms) | |
ERRORS | |
1. it can make a user | |
Error: SQLITE_ERROR: no such table: users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
/** @type {import('@adonisjs/framework/src/Env')} */ | |
const Env = use('Env') | |
/** @type {import('@adonisjs/ignitor/src/Helpers')} */ | |
const Helpers = use('Helpers') | |
module.exports = { | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Knex: run | |
$ npm install sqlite3 --save | |
Error: Cannot find module 'sqlite3' | |
Require stack: | |
- /home/jsdecena/codes/adonis/node_modules/knex/lib/dialects/sqlite3/index.js | |
- /home/jsdecena/codes/adonis/node_modules/knex/lib/index.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const User = make('App/Models/User') | |
const { test } = use('Test/Suite')('User unit test') | |
test('it can make a user', async ({ assert }) => { | |
const data = { | |
username: 'johndoe', |