Backport SafeCallContext, DefaultDatabaseFactory fixes from 7.6
This commit is contained in:
@@ -23,6 +23,8 @@ namespace Umbraco.Tests.Persistence
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
SafeCallContext.Clear();
|
||||
|
||||
_dbContext = new DatabaseContext(
|
||||
new DefaultDatabaseFactory(Core.Configuration.GlobalSettings.UmbracoConnectionName, Mock.Of<ILogger>()),
|
||||
Mock.Of<ILogger>(), new SqlCeSyntaxProvider(), Constants.DatabaseProviders.SqlCe);
|
||||
@@ -34,7 +36,7 @@ namespace Umbraco.Tests.Persistence
|
||||
{
|
||||
DatabaseContext = _dbContext,
|
||||
IsReady = true
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
@@ -99,7 +101,7 @@ namespace Umbraco.Tests.Persistence
|
||||
|
||||
var appCtx = new ApplicationContext(
|
||||
new DatabaseContext(Mock.Of<IDatabaseFactory>(), Mock.Of<ILogger>(), Mock.Of<ISqlSyntaxProvider>(), "test"),
|
||||
new ServiceContext(migrationEntryService: Mock.Of<IMigrationEntryService>()),
|
||||
new ServiceContext(migrationEntryService: Mock.Of<IMigrationEntryService>()),
|
||||
CacheHelper.CreateDisabledCacheHelper(),
|
||||
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user