2020-03-25 15:06:22 +11:00
using Microsoft.AspNetCore.Hosting ;
using Microsoft.AspNetCore.Http ;
using Umbraco.Core.Configuration ;
2020-04-22 14:23:56 +10:00
using Umbraco.Core.Logging ;
2020-03-27 11:39:17 +01:00
using Umbraco.Web.Common.AspNetCore ;
2020-03-25 15:06:22 +11:00
namespace Umbraco.Tests.Integration.Implementations
{
2020-03-27 11:39:17 +01:00
2020-03-25 15:06:22 +11:00
public class TestHostingEnvironment : AspNetCoreHostingEnvironment , Umbraco . Core . Hosting . IHostingEnvironment
{
2020-04-03 01:08:52 +11:00
public TestHostingEnvironment ( IHostingSettings hostingSettings , IWebHostEnvironment webHostEnvironment )
: base ( hostingSettings , webHostEnvironment )
2020-03-25 15:06:22 +11:00
{
}
/// <summary>
/// Override for tests since we are not hosted
/// </summary>
/// <remarks>
/// This is specifically used by IOHelper and we want this to return false so that the root path is manually calcualted which is what we want for tests.
/// </remarks>
bool Umbraco . Core . Hosting . IHostingEnvironment . IsHosted { get ; } = false ;
}
}