CommandTest.php 510 B

1234567891011121314151617181920212223
  1. <?php
  2. use PHPUnit\Framework\TestCase;
  3. use Limen\Redisun\Commands\Factory;
  4. class CommandTest extends TestCase
  5. {
  6. public function testRpushCommand()
  7. {
  8. $arguments = [
  9. 'list1','list2',1,2,3,4,
  10. ];
  11. $factory = new Factory();
  12. $command = $factory->getCommand('rpush', [$arguments[0], $arguments[1]], array_slice($arguments, 2));
  13. $this->assertEquals(2, $command->getKeysCount());
  14. $this->assertEquals($arguments, $command->getArguments());
  15. }
  16. }