public function testLocale() { Money::setLocale(null); $this->assertEquals('pt_BR', Money::getLocale()); Money::setLocale('en-US'); $this->assertEquals('en-US', Money::getLocale()); }
/** * Bootstrap the application events. * * @return void */ public function boot() { $config = __DIR__ . '/../../config/money.php'; $this->mergeConfigFrom($config, 'clicknow.money'); $this->publishes([$config => $this->app->make('path.config') . '/clicknow.money.php'], 'config'); Money::setLocale($this->app->make('translator')->getLocale()); Currency::setCurrencies($this->app->make('config')->get('clicknow.money')); }