diff --git a/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs b/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs index 5c373dba5..77a350f02 100644 --- a/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs +++ b/src/Orchard.Tests/DisplayManagement/Descriptors/DefaultShapeTableManagerTests.cs @@ -49,7 +49,6 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { }; builder.RegisterType().As() - .WithMetadata("Features", TestFeature()) .As() .InstancePerLifetimeScope(); } diff --git a/src/Orchard.Tests/Stubs/StubExtensionManager.cs b/src/Orchard.Tests/Stubs/StubExtensionManager.cs new file mode 100644 index 000000000..0bdf7f756 --- /dev/null +++ b/src/Orchard.Tests/Stubs/StubExtensionManager.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Web; +using Orchard.Environment.Extensions; +using Orchard.Environment.Extensions.Models; + +namespace Orchard.Tests.Stubs { + public class StubExtensionManager : IExtensionManager { + public IEnumerable AvailableExtensions() { + throw new NotSupportedException(); + } + + public IEnumerable AvailableFeatures() { + throw new NotSupportedException(); + } + + public IEnumerable LoadFeatures(IEnumerable featureDescriptors) { + throw new NotSupportedException(); + } + + public void InstallExtension(string extensionType, HttpPostedFileBase extensionBundle) { + throw new NotSupportedException(); + } + + public void UninstallExtension(string extensionType, string extensionName) { + throw new NotSupportedException(); + } + } +} diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapeTemplateStrategy/ShapeTemplateBindingStrategy.cs b/src/Orchard/DisplayManagement/Descriptors/ShapeTemplateStrategy/ShapeTemplateBindingStrategy.cs index 5e3f708fe..9fcd93088 100644 --- a/src/Orchard/DisplayManagement/Descriptors/ShapeTemplateStrategy/ShapeTemplateBindingStrategy.cs +++ b/src/Orchard/DisplayManagement/Descriptors/ShapeTemplateStrategy/ShapeTemplateBindingStrategy.cs @@ -82,7 +82,7 @@ namespace Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy { } private bool FeatureIsEnabled(FeatureDescriptor fd) { - return (fd.Extension.ExtensionType == "Theme" && fd.Name == "TheAdmin") || + return (fd.Extension.ExtensionType == "Theme" && (fd.Name == "TheAdmin" || fd.Name == "SafeMode")) || _shellDescriptor.Features.Any(sf => sf.Name == fd.Name); }