Basho\Tests\Riak\Command\Builder\UpdateHllTest::testStoreWithKey PHP Метод

testStoreWithKey() публичный Метод

Test command builder construct
public testStoreWithKey ( )
    public function testStoreWithKey()
    {
        // build an object
        $builder = new Command\Builder\UpdateHll(static::$riak);
        $builder->add('foo');
        $builder->add('bar');
        $builder->add('baz');
        $builder->buildLocation('some_key', 'some_bucket');
        $command = $builder->build();
        $this->assertInstanceOf('Basho\\Riak\\Command\\DataType\\Hll\\Store', $command);
        $this->assertInstanceOf('Basho\\Riak\\Bucket', $command->getBucket());
        $this->assertInstanceOf('Basho\\Riak\\Location', $command->getLocation());
        $this->assertEquals('some_bucket', $command->getBucket()->getName());
        $this->assertEquals('default', $command->getBucket()->getType());
        $this->assertEquals('some_key', $command->getLocation()->getKey());
        $this->assertEquals(['add_all' => ['foo', 'bar', 'baz']], $command->getData());
        $this->assertEquals(json_encode(['add_all' => ['foo', 'bar', 'baz']]), $command->getEncodedData());
    }