Basho\Tests\HllOperationsTest::testAddExistingAndNew PHP Method

testAddExistingAndNew() public method

    public function testAddExistingAndNew()
    {
        $command = (new Command\Builder\UpdateHll(static::$riak))->add('Penguins')->add('Sabres')->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(8, $response->getHll()->getData());
    }