/** * Get a constant. * * @param string $name Constant name. * @return mixed * @throws \Hoa\Math\Exception\UnknownFunction */ public function getConstant($name) { return $this->_context->getConstant($name); }
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); }