Basho\Tests\HllOperationsTest::testAddExisting PHP Method

testAddExisting() public method

public testAddExisting ( )
    public function testAddExisting()
    {
        $command = (new Command\Builder\UpdateHll(static::$riak))->add('Thrashers')->buildLocation(static::$key, 'Teams', static::HLL_BUCKET_TYPE)->build();
        $response = $command->execute();
        // 204 - No Content
        $this->assertEquals('204', $response->getCode());
        $command = (new Command\Builder\FetchHll(static::$riak))->buildLocation(static::$key, 'Teams', static::HLL_BUCKET_TYPE)->build();
        $response = $command->execute();
        $this->assertEquals('200', $response->getCode());
        $this->assertInstanceOf('Basho\\Riak\\DataType\\Hll', $response->getHll());
        $this->assertNotEmpty($response->getHll()->getData());
        $this->assertTrue(is_int($response->getHll()->getData()));
        $this->assertEquals(7, $response->getHll()->getData());
    }