vendor/yiisoft/yii2-imagine/tests/TestCase.php
/**
     * Populates Yii::$app with a new application
     * The application will be destroyed on tearDown() automatically.
     * @param array $config The application configuration, if needed
     * @param string $appClass name of the application class to create
     */
Populates Yii::$app with a new application
The application will be destroyed on tearDown() automatically.
@param array $config The application configuration, if needed
@param string $appClass name of the application class to create
Populates Yii :: $app with a new application The application will be destroyed on tearDown () automatically . @param array $config The application configuration if needed @param string $appClass name of the application class to create
protected function mockApplication($config = [], $appClass = '\yii\console\Application')
    {
        new $appClass(ArrayHelper::merge([
            'id' => 'testapp',
            'basePath' => __DIR__,
            'vendorPath' => dirname(__DIR__) . '/vendor',
        ], $config));
    }
protected function mockApplication ( $ config = [ ] , $ appClass = '\yii\console\Application' ) { new $ appClass ( ArrayHelper :: merge ( [ 'id' => 'testapp' , 'basePath' => __DIR__ , 'vendorPath' => dirname ( __DIR__ ) . '/vendor' , ] , $ config ) ) ; }
Populates Yii::$app with a new application
 The application will be destroyed on tearDown() automatically.
Populates Yii :: $app with a new application The application will be destroyed on tearDown () automatically .