Create a new Builder instance.
public forFeature ( string $slug ) : |
||
$slug | string | |
return |
public function testForFeature() { $manager = new Manager(new Config()); $map = $this->getMock('Zumba\\Swivel\\Map'); $bucket = $this->getMock('Zumba\\Swivel\\Bucket', null, [$map]); $manager->setBucket($bucket); $this->assertInstanceOf('Zumba\\Swivel\\Builder', $manager->forFeature('Test')); }
public function testNoDefaultFeatureOff() { $swivel = new Manager(new Config($this->map, 8)); $result = $swivel->forFeature('System')->addBehavior('NewAlgorithm', function () { return 'NewHotness'; })->noDefault()->execute(); $this->assertSame(null, $result); }
/** * Create a new Builder instance * * @param string $slug * @return \Zumba\Swivel\Builder * @see \Zumba\Swivel\ManagerInterface */ public function forFeature($slug) { $feature = parent::forFeature($slug); $this->features[$slug] = $feature; return $feature; }