Ejemplo n.º 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());
 }
Ejemplo n.º 2
0
 public function testRequestLogOff()
 {
     $this->setUpCommonExpectations();
     $this->command->setConfig(new \Zend\Config\Config(array('requestLog' => array('enabled' => false))));
     $this->assertEmpty($this->requestLog->getExecutedCommands());
     $this->assertEquals('run result', $this->command->execute());
     $this->assertEmpty($this->requestLog->getExecutedCommands());
 }