Author: Daniele Alessandri (suppakilla@gmail.com)
Inheritance: implements Predis\Command\Processor\CommandProcessorChainInterface, implements ArrayAccess
 /**
  * @group disconnected
  */
 public function testChainOfProcessors()
 {
     $processor = $this->getMock('Predis\\Command\\Processor\\CommandProcessorInterface');
     $processor->expects($this->exactly(2))->method('process');
     $chain = new ProcessorChain();
     $chain->add($processor);
     $chain->add($processor);
     $profile = ServerProfile::getDefault();
     $profile->setProcessor($chain);
     $profile->createCommand('info');
 }
 /**
  * @group disconnected
  */
 public function testProcessChain()
 {
     $command = $this->getMock('Predis\\Command\\CommandInterface');
     $processor1 = $this->getMock('Predis\\Command\\Processor\\ProcessorInterface');
     $processor1->expects($this->once())->method('process')->with($command);
     $processor2 = $this->getMock('Predis\\Command\\Processor\\ProcessorInterface');
     $processor2->expects($this->once())->method('process')->with($command);
     $processors = array($processor1, $processor2);
     $chain = new ProcessorChain($processors);
     $chain->process($command);
 }