public function testAddMessageFileToExportExceptionHandling() { $filePath = "/tmp/x/y/z/does-not-exist"; $this->setExpectedException('Illuminate\\Filesystem\\FileNotFoundException', "File not found: {$filePath}"); JsLocalizationHelper::addMessageFileToExport($filePath, 'xyz::'); }
/** * Returns the message keys of all messages * that are supposed to be sent to the browser. * * @return array Array of message keys. */ protected function getMessageKeys() { $messageKeys = Config::get('js-localization::config.messages'); $messageKeys = JsLocalizationHelper::resolveMessageKeyArray($messageKeys); $messageKeys = array_unique(array_merge($messageKeys, JsLocalizationHelper::getAdditionalMessages())); return $messageKeys; }