Example #1
0
 /**
  * Get a constant.
  *
  * @param   string  $name    Constant name.
  * @return  mixed
  * @throws  \Hoa\Math\Exception\UnknownFunction
  */
 public function getConstant($name)
 {
     return $this->_context->getConstant($name);
 }
Example #2
0
 public function case_context_returns_constant_value()
 {
     $this->given($name = 'FOO', $value = 42, $context = new CUT(), $context->addConstant($name, $value))->when($result = $context->getConstant($name))->then->variable($result)->isEqualTo($value);
 }