/** * Debug service/method call procedure. * This method should be called before event * * @param string $method The service/method name to be debugged * @param string $topic The message topic * @param string $headers The headers of message * @param string $body The message body * @return void */ public function start($method, $topic, $headers, $body) { if (!$this->getId()) { $this->setName($method); $this->setStartedAt(now()); $this->setStartedMicrotime(microtime(1)); $this->save(); } if (count(self::$_stack) == 0 || self::$_stackPointer == 1) { self::$_stackPointer = 0; $node = self::_createNode(); $node->setMethod($method); $node->setTopic($topic); $node->setHeaders($headers); $node->setBody($body); $node->setDebugId($this->getId()); self::$_stack[self::$_stackPointer++] = $node; foreach (self::$_visitors as $visitor) { $visitor->start($node); } } $node = self::_createNode(); $node->setMethod($method); $node->setDebugId($this->getId()); $parent = self::$_stack[self::$_stackPointer - 1]; $node->setParentId($parent->getNodeId()); self::$_stack[self::$_stackPointer++] = $node; foreach (self::$_visitors as $visitor) { $visitor->start($node); } return $this; }
/** * @expectedException Mage_Core_Exception * @return void */ public function testOffsetSet() { $this->object->offsetSet('testoffset', 'testvalue'); }