Commit bbf37414 authored by Brian Hatchet's avatar Brian Hatchet :speech_balloon:

extending feature flag false by default to the engine

1 merge request!255(feat) Disabling comments 526
Pipeline #71102478 passed with stages
in 8 minutes and 55 seconds
......@@ -45,9 +45,9 @@ class Manager
$features = $this->config->get('features') ?: [];
if (!isset($features[$feature])) {
error_log("[Features\Manager] Feature '{$feature}' is not declared. Assuming true.");
error_log("[Features\Manager] Feature '{$feature}' is not declared. Assuming false.");
return true;
return false;
}
if ($features[$feature] === 'admin' && $this->user->isAdmin()) {
......
......@@ -24,13 +24,13 @@ class ManagerSpec extends ObjectBehavior
$this->shouldHaveType(Manager::class);
}
function it_should_check_if_a_feature_exists_unsuccessfully_and_assume_its_active()
function it_should_check_if_a_feature_exists_unsuccessfully_and_assume_its_inactive()
{
$this->config->get('features')
->shouldBeCalled()
->willReturn(['plus' => true, 'wire' => false]);
$this->has('boost')->shouldReturn(true);
$this->has('boost')->shouldReturn(false);
}
function it_should_check_if_a_feature_exists_and_return_its_deactivated()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment