Exemplo n.º 1
0
 /**
  * @group redis-strings
  */
 public function testSetRange()
 {
     $this->assertSame(9, $this->client->setrange('foo', 4, 'World'));
     $this->assertSame("World", $this->client->get('foo'));
     $this->client->set('foo', 'Hello World');
     $this->assertSame(14, $this->client->setrange('foo', 6, 'Universe'));
     $this->assertSame('Hello Universe', $this->client->get('foo'));
     $this->client->set('foo', 'bar');
     $this->assertSame(9, $this->client->setrange('foo', 6, 'baz'));
     $this->assertSame("barbaz", $this->client->get('foo'));
 }