Google\Cloud\Tests\Storage\AclTest::testAdd PHP Method

testAdd() public method

public testAdd ( )
    public function testAdd()
    {
        $accessControl = ['entity' => 'allAuthenticatedUsers', 'role' => 'READER'];
        $this->connection->insertAcl(Argument::any())->willReturn($accessControl);
        $acl = new Acl($this->connection->reveal(), 'bucketAccessControls', ['bucket' => 'bucket']);
        $this->assertEquals($accessControl, $acl->add('allAuthenticatedUsers', 'READER'));
    }