/** * @depends testPutAndListObjects */ public function testGetObjectAcl() { self::log("Getting the object's ACL"); $model = $this->client->getObjectAcl(array('Bucket' => $this->bucket, 'Key' => self::TEST_KEY)); $data = array(); foreach (Acp::fromArray($model->toArray()) as $grant) { $grantee = $grant->getGrantee(); $data[$grantee->getGroupUri()] = array($grantee->getType(), $grant->getPermission()); } $this->assertEquals(2, count($data)); $this->assertArrayHasKey('http://acs.amazonaws.com/groups/global/AllUsers', $data); $this->assertArrayHasKey('http://acs.amazonaws.com/groups/global/AuthenticatedUsers', $data); $this->assertEquals(array('Group', 'READ_ACP'), $data['http://acs.amazonaws.com/groups/global/AllUsers']); $this->assertEquals(array('Group', 'READ'), $data['http://acs.amazonaws.com/groups/global/AuthenticatedUsers']); }