Пример #1
0
 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());
 }
Пример #2
0
 /**
  * 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);
     }
 }