public function testParseNewSettingsFormat() { $feature = new Feature('chat', '100|4,12|fivesonly|FF_facebookIntegration=1'); $this->assertEquals(100, $feature->getPercentage()); $this->assertEquals([4, 12], $feature->getUsers()); $this->assertEquals(['fivesonly'], $feature->getGroups()); $this->assertEquals('FF_facebookIntegration=1', $feature->getRequestParam()); }
/** * @param Feature $feature */ private function save(Feature $feature) { $name = $feature->getName(); $this->storage->set($this->key($name), $feature->serialize()); $features = $this->features(); if (!in_array($name, $features)) { $features[] = $name; } $this->storage->set($this->featuresKey(), implode(',', $features)); }