public function initialize() { require_once "vendor/autoload.php"; define('YII_DEBUG', false); require_once "vendor/yiisoft/yii2/Yii.php"; $application = new yii\console\Application(['id' => 'yii-benchmark', 'basePath' => __DIR__]); Author::$db = Book::$db = $this->db = new Connection(['dsn' => 'sqlite::memory:']); $this->db->open(); Author::createTable(); Book::createTable(); }