Cleanup UmbracoContext
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
var umbracoContext = GetUmbracoContext("/test");
|
||||
|
||||
//set the UmbracoContext.Current since the extension methods rely on it
|
||||
Umbraco.Web.Current.SetUmbracoContext(umbracoContext, true);
|
||||
Umbraco.Web.Current.UmbracoContextAccessor.UmbracoContext = umbracoContext;
|
||||
}
|
||||
|
||||
public override void TearDown()
|
||||
|
||||
@@ -64,14 +64,14 @@ namespace Umbraco.Tests.PublishedContent
|
||||
facadeService.Setup(x => x.CreateFacade(It.IsAny<string>())).Returns(facade);
|
||||
|
||||
var httpContext = GetHttpContextFactory("http://umbraco.local/", routeData).HttpContext;
|
||||
var umbracoContext = UmbracoContext.CreateContext(
|
||||
var umbracoContext = new UmbracoContext(
|
||||
httpContext,
|
||||
facadeService.Object,
|
||||
new WebSecurity(httpContext, Current.Services.UserService),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
Enumerable.Empty<IUrlProvider>());
|
||||
|
||||
Umbraco.Web.Current.SetUmbracoContext(umbracoContext, true);
|
||||
Umbraco.Web.Current.UmbracoContextAccessor.UmbracoContext = umbracoContext;
|
||||
}
|
||||
|
||||
public override void TearDown()
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Umbraco.Tests.PublishedContent
|
||||
ContentTypesCache.GetPublishedContentTypeByAlias = (alias) => type;
|
||||
|
||||
var umbracoContext = GetUmbracoContext("/test");
|
||||
Umbraco.Web.Current.SetUmbracoContext(umbracoContext, true);
|
||||
Umbraco.Web.Current.UmbracoContextAccessor.UmbracoContext = umbracoContext;
|
||||
}
|
||||
|
||||
protected override void MoreSetUp()
|
||||
|
||||
Reference in New Issue
Block a user