diff options
Diffstat (limited to 'langs/i18n/i18n_test.go')
-rw-r--r-- | langs/i18n/i18n_test.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/langs/i18n/i18n_test.go b/langs/i18n/i18n_test.go index b67cabc55..e08210848 100644 --- a/langs/i18n/i18n_test.go +++ b/langs/i18n/i18n_test.go @@ -17,11 +17,13 @@ import ( "path/filepath" "testing" + "github.com/gohugoio/hugo/modules" + "github.com/gohugoio/hugo/tpl/tplimpl" "github.com/gohugoio/hugo/common/loggers" - "github.com/gohugoio/hugo/htesting" "github.com/gohugoio/hugo/langs" + "github.com/gohugoio/hugo/resources/page" "github.com/spf13/afero" "github.com/spf13/viper" @@ -199,7 +201,7 @@ func newDepsConfig(tp *TranslationProvider, cfg config.Provider, fs *hugofs.Fs) l.Set("i18nDir", "i18n") return deps.DepsCfg{ Language: l, - Site: htesting.NewTestHugoSite(), + Site: page.NewDummyHugoSite(cfg), Cfg: cfg, Fs: fs, Logger: logger, @@ -219,6 +221,13 @@ func getConfig() *viper.Viper { v.Set("assetDir", "assets") v.Set("resourceDir", "resources") v.Set("publishDir", "public") + langs.LoadLanguageSettings(v, nil) + mod, err := modules.CreateProjectModule(v) + if err != nil { + panic(err) + } + v.Set("allModules", modules.Modules{mod}) + return v } |