12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace Predis\Command;
- class ListPopFirstBlockingTest extends PredisCommandTestCase
- {
-
- protected function getExpectedCommand()
- {
- return 'Predis\Command\ListPopFirstBlocking';
- }
-
- protected function getExpectedId()
- {
- return 'BLPOP';
- }
-
- public function testFilterArguments()
- {
- $arguments = array('key1', 'key2', 'key3', 10);
- $expected = array('key1', 'key2', 'key3', 10);
- $command = $this->getCommand();
- $command->setArguments($arguments);
- $this->assertSame($expected, $command->getArguments());
- }
-
- public function testFilterArgumentsKeysAsSingleArray()
- {
- $arguments = array(array('key1', 'key2', 'key3'), 10);
- $expected = array('key1', 'key2', 'key3', 10);
- $command = $this->getCommand();
- $command->setArguments($arguments);
- $this->assertSame($expected, $command->getArguments());
- }
-
- public function testParseResponse()
- {
- $raw = array('key', 'value');
- $expected = array('key', 'value');
- $command = $this->getCommand();
- $this->assertSame($expected, $command->parseResponse($raw));
- }
- }
|