/** * Returns the arguments of a stack element as string dumps. * * Returns an array corresponding to the 'params' key of a unified stack * element, created from the 'args' ($args) element from an unified one. * * @param array $args * @return array */ private function convertArgsToParams($args) { $params = array(); foreach ($args as $arg) { $params[] = ezcDebugVariableDumpTool::dumpVariable($arg, $this->options->stackTraceMaxData, $this->options->stackTraceMaxChildren, $this->options->stackTraceMaxDepth); } return $params; }
public function testDumpResource() { $res = fopen(__FILE__, 'r'); preg_match('(Resource id #(?P<id>\\d+))', (string) $res, $matches); $this->assertEquals("resource({$matches['id']}) of type (stream)", ezcDebugVariableDumpTool::dumpVariable($res, 512, 128, 3)); }