Exemple #1
0
 public function setUp()
 {
     parent::setUp();
     $this->providers['a'] = $this->getMockProvider('a');
     $this->providers['b'] = $this->getMockProvider('b');
     $this->features['foo_a'] = $this->getMockFeature('foo', true, $this->providers['a']);
     $this->features['bar_a'] = $this->getMockFeature('bar', true, $this->providers['a']);
     $this->features['foo_b'] = $this->getMockFeature('foo', null, $this->providers['b']);
     $this->features['bar_b'] = $this->getMockFeature('bar', false, $this->providers['b']);
     $this->default = $this->getSut();
     $this->default->mergeFeatures([$this->features['foo_a'], $this->features['bar_a']]);
     $this->default->mergeFeatures([$this->features['foo_b'], $this->features['bar_b']]);
 }
Exemple #2
0
 /**
  * @return FeatureSet
  */
 protected function createFeatureSet()
 {
     $this->lock();
     $set = new FeatureSet();
     foreach ($this->providers as $provider) {
         $features = $this->validateFeatureArray($this->getFeaturesFromProvider($provider), $provider);
         $set->mergeFeatures($features);
     }
     return $set;
 }