PHP code example of pastuhov / yii2-logstock
1. Go to this page and download the library: Download pastuhov/yii2-logstock 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/ */
pastuhov / yii2-logstock example snippets
...
if (YII_ENV_TEST) {
// configuration adjustments for 'test' environment
$config['bootstrap'][] = 'logstock';
$config['modules']['logstock'] = [
'class' => \pastuhov\logstock\Module::class,
];
}
...
...
public function testExampleUnitUsage()
{
$this->tester->assertLog(function (){
Yii::info('Test info message');
Yii::$app->getDb()->createCommand('SELECT * FROM page')->execute();
}, Yii::$app);
}
...