| 73 | } |
| 74 | |
| 75 | TestEngine *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 | |
| 94 | void TestLangselect::cleanupTestCase() |
| 95 | { |
nothing calls this directly
no test coverage detected