MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / getEngine

Method getEngine

tests/testlangselect.cpp:75–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75TestEngine *TestLangselect::getEngine()
76{
77 qputenv("RECURSION", QByteArrayLiteral("100"));
78 auto app = new TestApplication;
79 auto engine = new TestEngine(app, QVariantMap());
80 new Session(app);
81 auto statDir = new StaticSimple(app);
82 statDir->setIncludePaths({staticDir.path()});
83 auto plugin = new LangSelect(app, LangSelect::Cookie);
84 plugin->setSupportedLocales({QLocale(QLocale::German), QLocale(QLocale::Portuguese)});
85 plugin->setFallbackLocale(QLocale(QLocale::English, QLocale::UnitedKingdom));
86 plugin->setCookieName("lang");
87 new LangselectTest(app);
88 if (!engine->init()) {
89 return nullptr;
90 }
91 return engine;
92}
93
94void TestLangselect::cleanupTestCase()
95{

Callers

nothing calls this directly

Calls 6

setSupportedLocalesMethod · 0.80
setFallbackLocaleMethod · 0.80
setIncludePathsMethod · 0.45
pathMethod · 0.45
setCookieNameMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected