/** * Test unioning sets and storing the result */ public function testSunionstore() { $this->redis->del('testSunionstore1'); $this->redis->del('testSunionstore23'); $this->redis->del('testSunionstore3'); $this->redis->sadd('testSunionstore1', 'a'); $this->redis->sadd('testSunionstore23', 'b'); $this->redis->sadd('testSunionstore23', 'c'); $numResults = $this->redis->sunionstore('testSunionstore3', array('testSunionstore1', 'testSunionstore23')); $this->assertInternalType('int', $numResults); $this->assertEquals(3, $numResults); $this->assertContains('a', $this->redis->smembers('testSunionstore3')); $this->assertContains('b', $this->redis->smembers('testSunionstore3')); $this->assertContains('c', $this->redis->smembers('testSunionstore3')); $this->assertEquals(3, $this->redis->scard('testSunionstore3')); }