public function testParse() { $test_list = array(); $test_list[] = array('in' => '/' . '** * this is the variable description * * @var \\Path\\To\\The\\Class ********************************************************************' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * this is the variable description * * @var \\Path\\To\\The\\Class *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * * @param boolean $one this is a mutli-line description * that has some more text * * and a little more text * * @param string $two description *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * * @param boolean $one this is a mutli-line description * that has some more text * * @param string $two description *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * this is the short description * * this is the long description. * and this also. * * and also this. * * @param boolean $one this is a mutli-line description * that has some more text * @param string $two description *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * this is the short description * * this is the long description. * and this also. * * and also this. * * @param boolean $one description * @param string $two description *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * @param boolean $is_there true if there, false otherwise *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * this will be the multi-line long description * and here is the second line * and the third *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * this will be the short description *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** * * * *' . '/', 'out' => array()); $test_list[] = array('in' => '/' . '** *' . '/', 'out' => array()); foreach ($test_list as $i => $test_map) { $rdc = new ReflectionDocBlock($test_map['in']); \out::i($rdc); ///$this->assertEquals($test_map['out'],$rfile->getClasses(),$i); } //foreach }
/** * check for infinite recursion, throw an exception if found * * this is done by keeping an internal count of how many times this method has been called, * if that count reaches the max count then an exception is thrown * * @deprecated I've removed catching exceptions from handleError, so this is no longer needed, I'll remove next pass * @return integer the current count */ protected function handleRecursion(\Exception $e) { $max_ir_count = $this->getField('framework.recursion_max_count'); $ir_field = 'framework.recursion_count'; $ir_count = $this->getField($ir_field, 0); if ($ir_count > $max_ir_count) { $e_msg = sprintf('Infinite recursion suspected! The error handler has been called more than %s times, last exception (%s): %s', $max_ir_count, get_class($e), $e->getMessage()); \out::i($this); ///trigger_error($e_msg,E_USER_ERROR); throw new \RuntimeException($e_msg, $e->getCode()); } else { $ir_count += 1; $this->setField($ir_field, $ir_count); } //if/else return $ir_count; }