public function registerFeatureFlags()
 {
     try {
         $features = FeatureFlag::all()->toArray();
         foreach ($features as $key => $value) {
             $features = $this->transformFeatures($features, $value, $key);
             unset($features[$key]);
         }
         $world = new World();
         \Feature\Feature::create($world, $features);
     } catch (\Exception $e) {
         Log::info(sprintf("Silent Failure of Feature Flag %s", $e->getMessage()));
     }
 }
Пример #2
0
 public function testDefaultToOffFeature()
 {
     Feature::clear();
     Feature::create($this->worldMock, []);
     $this->assertFalse(Feature::isEnabled('feature'));
 }