/** * @expectedException \Exception * @expectedExceptionMessage Unexpected "3" */ public function testUnknownCharacterThrowsException() { $this->evaluator->evaluate('((1&(0|3|1|0|0)&1)&1|(0|1))'); }
/** * @param string $rule * @param mixed[] $variables * @return bool * @throws \nicoSWD\Rules\Exceptions\ParserException */ protected function evaluate($rule, array $variables = []) { $this->parser->assignVariables($variables); $result = $this->parser->parse($rule); return $this->evaluator->evaluate($result); }