Gii Tester (Yii2 Test Generator Code) with Person Relationship with PostgreSQL
The preferred way to install this extension is through composer.
Either run
composer require allankaio/giitester
or add
"allankaio/giitester": "^1"
to the require
section of your composer.json
file.
- Then you must add this parameter to config\params.php.
'testepath' => 'tests'
- Then you must add this code at your config\web.php.
'components'=>[
'user' => [
'class' => 'webvimark\modules\UserManagement\components\UserConfig',
// Comment this if you don't want to record user logins
'on afterLogin' => function($event) {
\webvimark\modules\UserManagement\models\UserVisitLog::newVisitor($event->identity->id);
}
],
],
'modules' => [
'user-management' => [
'class' => 'webvimark\modules\UserManagement\UserManagementModule',
'on beforeAction'=>function(yii\base\ActionEvent $event) {
if ( $event->action->uniqueId == 'user-management/auth/login' ){
$event->action->controller->layout = 'loginLayout.php';
};
},
],
'gridview' => [
'class' => '\kartik\grid\Module',
],
'datecontrol' => [
'class' => '\kartik\datecontrol\Module',
],
],
See gridview settings on http://demos.krajee.com/grid#module
See datecontrol settings on http://demos.krajee.com/datecontrol#module
- In your config/console.php (this is needed for migrations and working with console)
'modules'=>[
'user-management' => [
'class' => 'webvimark\modules\UserManagement\UserManagementModule',
'controllerNamespace'=>'vendor\webvimark\modules\UserManagement\controllers', // To prevent yii help from crashing
],
],
- Run migrations
./yii migrate --migrationPath=vendor/webvimark/module-user-management/migrations/
See user-management settings on https://github.com/webvimark/user-management
Go to your gii tools, and notice the new EasYii Gii Generator for models & CRUD
- Generate representation columns(RepresentingColumn)
- Generate CPF/CNPJ validator
- Generate e-mail validator
- Specify your label name / attribute for foreign keys and fields based on the DBMS comment
- Generate all CRUD with wildcard (*) of table
- Generate related input output
- Export to various formats
- Expandable / collapsible row at index grid view for related data
- Views with or without TabularForms
- Custom fields for dates (DateControl)
- Custom fields for foreign keys (Select2 and RepresentingColumn)
- Exclusion constraint based on DBMS actions
- Addition of the security module (User management module for Yii 2)
- Custom fields for input file (FileInput)
- View foreign key data based on RepresentingColumn
- Generate all tests of a table
- Generate tests for CRUD
- Generate tests for data types
- Generate tests for Email/CPF
- Generate migration from your database structure (based on : https://github.com/deesoft/yii2-gii)
I'm open for any improvement
- Jiwanndaru (jiwanndaru@gmail.com) for creating the tradition
- kartik-v (https://github.com/kartik-v) for most of widgets
- schmunk42 (https://github.com/schmunk42) for bootstrap & model base & extension
- mdmunir (https://github.com/mdmunir) for JsBlock & Migration Generator (from https://github.com/deesoft/yii2-gii)
- mootensai (https://github.com/mootensai) for yii2-enhanced-gii (https://github.com/mootensai/yii2-enhanced-gii)
- thtmorais (https://github.com/thtmorais/easyiigii)
- petersonsilvadejesus (https://github.com/petersonsilvadejesus)
- Allan Kaio Brito Macedo (https://github.com/AllanKaio21)