protected function getTestMethodName($testMethodName) { return Filter::camelCaseToSpace(substr($testMethodName, 2)); }
/** * @param string $exampleGroupName * @param string $specificationText * @return string * @throws \UnexpectedValueException */ public function getExampleMethod($exampleGroupName, $specificationText) { foreach ($this->examplesByGroup[$this->getExampleGroupClass($exampleGroupName)] as $exampleMethod) { /* @var $exampleMethod \ReflectionMethod */ if ($specificationText == Filter::camelCaseToSpace(substr($exampleMethod->getName(), 2))) { return $exampleMethod->getName(); } } throw new \UnexpectedValueException(sprintf('The example corresponding to [ %s ] and [ %s ] is not found in the test suite.', $specificationText, $exampleGroupName)); }
/** * Return the specification text taken from method name * * itReturnZeroWithNoArguments * becomes * returns zero with no argument * * @param string $methodName * @return string */ public function getSpecificationText() { $methodName = substr($this->_methodName, 2); return Filter::camelCaseToSpace($methodName); }