public function testCanConvertToArray() { $grantee = new Grantee('*****@*****.**'); $this->assertEquals(array('Type' => 'AmazonCustomerByEmail', 'EmailAddress' => '*****@*****.**'), $grantee->toArray()); $grantee = new Grantee('12345'); $this->assertEquals(array('Type' => 'CanonicalUser', 'ID' => '12345', 'DisplayName' => '12345'), $grantee->toArray()); $grantee = new Grantee(Group::ALL_USERS); $this->assertEquals(array('Type' => 'Group', 'URI' => 'http://acs.amazonaws.com/groups/global/AllUsers'), $grantee->toArray()); }