Basho\Tests\SecurityFeaturesTest::testUnauthorized PHP Method

testUnauthorized() public method

public testUnauthorized ( )
    public function testUnauthorized()
    {
        $nodes = [(new Riak\Node\Builder())->atHost(static::getTestHost())->onPort(static::getTestSecurePort())->usingPasswordAuthentication('unauthorizeduser', 'hispassword')->withCertificateAuthorityFile(getcwd() . '/tools/test-ca/certs/cacert.pem')->build()];
        $riak = new Riak($nodes);
        // build an object
        $command = (new Command\Builder\StoreObject($riak))->buildObject('some_data')->buildBucket('users')->build();
        $response = $command->execute();
        // expects 401 - Unauthorized
        $this->assertEquals('401', $response->getCode());
    }