PHP code example of branchonline / yii2-pgsqltester

1. Go to this page and download the library: Download branchonline/yii2-pgsqltester library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

branchonline / yii2-pgsqltester example snippets



return [
    'id' => 'basic-tests',
    'basePath' => dirname(__DIR__),
    'language' => 'en-US',
    'components' => [
        'config_db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'pgsql:host=localhost;port=5432;dbname=postgres',
        ],
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'pgsql:host=localhost;port=5432;dbname=testing',
        ],
    ],
];


return [
    'components' => [
        'db' => [
            'dsn' => 'pgsql:host=localhost;port=5432;dbname=testing_template'
        ],
    ],
    'controllerMap' => [
        'test' => [
            'class' => 'branchonline\pgsqltester\TestController',
        ]
    ],
];



defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');

_DIR__ . '/path/to/test.php'),