True standalone test
This commit is contained in:
@@ -101,11 +101,11 @@ namespace Umbraco.Web
|
||||
/// <para>If an actual current UmbracoContext is already present, the disposable object is null and this method does nothing.</para>
|
||||
/// <para>Otherwise, a temporary, dummy UmbracoContext is created and registered in the accessor. And disposed and removed from the accessor.</para>
|
||||
/// </remarks>
|
||||
internal static IDisposable EnsureContext() // keep this internal for now!
|
||||
internal static IDisposable EnsureContext(HttpContextBase httpContext = null) // keep this internal for now!
|
||||
{
|
||||
if (Composing.Current.UmbracoContext != null) return null;
|
||||
|
||||
var httpContext = new HttpContextWrapper(System.Web.HttpContext.Current ?? new HttpContext(new SimpleWorkerRequest("temp.aspx", "", new StringWriter())));
|
||||
httpContext = httpContext ?? new HttpContextWrapper(System.Web.HttpContext.Current ?? new HttpContext(new SimpleWorkerRequest("temp.aspx", "", new StringWriter())));
|
||||
|
||||
return EnsureContext(
|
||||
Composing.Current.UmbracoContextAccessor,
|
||||
|
||||
Reference in New Issue
Block a user