/** * Register enjoin. */ public function register() { $this->app->bind('enjoin', function () { Factory::bootstrap($this->options, $this->app); return new Enjoin(); }); }
public function testBootstrap() { (new Dotenv(__DIR__ . '/../../'))->overload(); $this->handleDebug(__FUNCTION__); Factory::bootstrap(['database' => ['default' => 'test', 'connections' => ['test' => ['driver' => $this->getDriver(), 'host' => 'localhost', 'database' => getenv('ENJ_DATABASE'), 'username' => getenv('ENJ_USERNAME'), 'password' => getenv('ENJ_PASSWORD'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '']], 'redis' => ['cluster' => false, 'default' => ['host' => '127.0.0.1', 'port' => 6379, 'database' => 0]]], 'enjoin' => ['lang_dir' => 'vendor/caouecs/laravel-lang'], 'cache' => ['default' => getenv('ENJ_CACHE'), 'stores' => ['redis' => ['driver' => 'redis', 'connection' => 'default'], 'memcached' => ['driver' => 'memcached', 'servers' => [['host' => '127.0.0.1', 'port' => 11211, 'weight' => 100]]]], 'prefix' => 'enjoin_test']]); }