public function testAddAndGet() { $commandA = $this->getMock('Odesk\\Phystrix\\AbstractCommand', array('run')); $commandB = $this->getMock('Odesk\\Phystrix\\AbstractCommand', array('run')); $this->assertEmpty($this->requestLog->getExecutedCommands()); $this->requestLog->addExecutedCommand($commandA); $this->requestLog->addExecutedCommand($commandB); $this->assertEquals(array($commandA, $commandB), $this->requestLog->getExecutedCommands()); }
/** * Adds reference to the command to the current request log */ private function recordExecutedCommand() { if ($this->requestLog && $this->config->get('requestLog')->get('enabled')) { $this->requestLog->addExecutedCommand($this); } }