Ensure legacy scope returned when using legacy scope provider (#12465)

* Separate legacy scope provider interface and explicitly implement.

* Don't rely on legacy scope provider for existing tests.

* Assert correct type returned when using legacy scope provider.
This commit is contained in:
Paul Johnson
2022-05-24 11:26:28 +01:00
committed by GitHub
parent e12c2eca1b
commit 41a003e20e
11 changed files with 152 additions and 14 deletions

View File

@@ -1171,9 +1171,9 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.PublishedCache.NuCache
}
}
private static IScopeProvider GetScopeProvider()
private static ICoreScopeProvider GetScopeProvider()
{
IScopeProvider scopeProvider = Mock.Of<IScopeProvider>();
ICoreScopeProvider scopeProvider = Mock.Of<ICoreScopeProvider>();
Mock.Get(scopeProvider)
.Setup(x => x.Context).Returns(() => null);
return scopeProvider;