/** * Execute the console command. * * @return void */ public function fire() { $this->line('Refreshing the message cache...'); $locales = Config::get('js-localization::config.locales'); if (!is_array($locales)) { throw new \Exception('Please set the "locales" config! See https://github.com/andywer/laravel-js-localization#configuration'); } CachingService::refreshMessageCache(); }
public function testRefreshMessageCacheEvent() { Event::shouldReceive('fire')->once()->with('JsLocalization.registerMessages'); CachingService::refreshMessageCache(); }