Example #1
0
 /**
  * Return if a rule is overriden by a RuleOverride
  *
  * @param Rule $rule Rule to check
  *
  * @return bool
  */
 private function isOverriden(Rule $rule)
 {
     return array_key_exists($rule->getName(), $this->ruleOverride);
 }
Example #2
0
 public function testSetter()
 {
     $rule = new base('ruletest');
     $this->object($rule->proposition('test', true))->isInstanceOf('MojoLyon\\Axiom\\Rule')->object($rule->variable('test2', 'val'))->isInstanceOf('MojoLyon\\Axiom\\Rule')->object($rule->operator('and'))->isInstanceOf('MojoLyon\\Axiom\\Rule')->object($rule->add(new \MojoLyon\Axiom\RuleElement\DateVariable('date', new \DateTime())))->isInstanceOf('MojoLyon\\Axiom\\Rule')->string($rule->getName())->isEqualTo('ruletest');
 }