コード例 #1
0
ファイル: ChainSpec.php プロジェクト: coduo/flipper
 function it_is_not_active_when_non_of_strategies_arent_active(Strategy $strategy1, Strategy $strategy2, Feature $feature, Context $context)
 {
     $this->beConstructedWith(array($strategy1, $strategy2));
     $strategy1->isActive($feature, $context)->willReturn(false);
     $strategy2->isActive($feature, $context)->willReturn(false);
     $this->isActive($feature, $context)->shouldReturn(false);
 }
コード例 #2
0
ファイル: Feature.php プロジェクト: coduo/flipper
 /**
  * @param  Context $context
  * @return bool
  */
 public function isActive(Context $context)
 {
     return $this->strategy->isActive($this, $context);
 }