示例#1
0
 /**
  * @group disconnected
  */
 public function testPrefixSkipLast()
 {
     $arguments = array('1st', '2nd', '3rd', '4th');
     $expected = array('prefix:1st', 'prefix:2nd', 'prefix:3rd', '4th');
     $command = $this->getMockForAbstractClass('Predis\\Commands\\Command');
     $command->setRawArguments($arguments);
     PrefixHelpers::skipLast($command, 'prefix:');
     $this->assertSame($expected, $command->getArguments());
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 protected function onPrefixKeys(array $arguments, $prefix)
 {
     return PrefixHelpers::multipleKeys($arguments, $prefix);
 }
示例#3
0
 /**
  * {@inheritdoc}
  */
 public function prefixKeys($prefix)
 {
     PrefixHelpers::all($this, $prefix);
 }
示例#4
0
 /**
  * {@inheritdoc}
  */
 protected function onPrefixKeys(array $arguments, $prefix)
 {
     return PrefixHelpers::skipLastArgument($arguments, $prefix);
 }