예제 #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);
 }
예제 #2
0
파일: Context.php 프로젝트: mgratch/Math
 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);
 }