Merge remote-tracking branch 'origin/temp8' into temp8-injection-ihttpcontextaccessor-instead-of-controller

# Conflicts:
#	src/Umbraco.Tests/Web/Mvc/RenderIndexActionSelectorAttributeTests.cs
#	src/Umbraco.Tests/Web/Mvc/SurfaceControllerTests.cs
#	src/Umbraco.Web/Editors/Filters/UserGroupAuthorizationAttribute.cs
#	src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs
#	src/Umbraco.Web/Mvc/RedirectToUmbracoPageResult.cs
This commit is contained in:
Bjarke Berg
2019-02-15 09:48:55 +01:00
378 changed files with 3049 additions and 6573 deletions

View File

@@ -135,16 +135,16 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting
var umbracoContextAccessor = Umbraco.Web.Composing.Current.UmbracoContextAccessor;
var umbCtx = UmbracoContext.EnsureContext(
umbracoContextAccessor,
httpContext,
var umbCtx = new UmbracoContext(httpContext,
publishedSnapshotService.Object,
webSecurity.Object,
Mock.Of<IUmbracoSettingsSection>(section => section.WebRouting == Mock.Of<IWebRoutingSection>(routingSection => routingSection.UrlProviderMode == UrlProviderMode.Auto.ToString())),
Mock.Of<IUmbracoSettingsSection>(section => section.WebRouting == Mock.Of<IWebRoutingSection>(routingSection => routingSection.UrlProviderMode == "Auto")),
Enumerable.Empty<IUrlProvider>(),
globalSettings,
new TestVariationContextAccessor(),
true); //replace it
new TestVariationContextAccessor());
//replace it
umbracoContextAccessor.UmbracoContext = umbCtx;
var urlHelper = new Mock<IUrlProvider>();
urlHelper.Setup(provider => provider.GetUrl(It.IsAny<UmbracoContext>(), It.IsAny<IPublishedContent>(), It.IsAny<UrlProviderMode>(), It.IsAny<string>(), It.IsAny<Uri>()))