From 6e540de40843744b7fb834114e7ae7e215f4c649 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:36:58 +0200 Subject: [PATCH] Added additional logging --- .../Controllers/ContentControllerTests.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs index 540aa91725..936835cac9 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs @@ -444,7 +444,24 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers body = body.TrimStart(AngularJsonMediaTypeFormatter.XsrfPrefix); ContentItemDisplay display = JsonConvert.DeserializeObject(body); - TestContext.Progress.Write($"======CURRENT THREAD CULTURE IN TEST======{Thread.CurrentThread.CurrentCulture.Name}"); + var currentThreadCulture = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName; + var currentUICulture = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName; + if (string.IsNullOrEmpty(currentThreadCulture)) + { + TestContext.Progress.Write($"======CURRENT THREAD CULTURE IN TEST====== NO CULTURE"); + } + else + { + TestContext.Progress.Write($"======CURRENT THREAD CULTURE IN TEST======{currentThreadCulture}"); + } + if (string.IsNullOrEmpty(currentUICulture)) + { + TestContext.Progress.Write($"======CURRENT UI CULTURE IN TEST====== NO CULTURE"); + } + else + { + TestContext.Progress.Write($"======CURRENT UI CULTURE IN TEST======{currentUICulture}"); + } ILocalizedTextService localizedTextService = GetRequiredService(); foreach (var culture in localizedTextService.GetSupportedCultures()) {