Skip to content

Commit

Permalink
Fixed some code comments and added a test for AmazonSQS::add_permissi…
Browse files Browse the repository at this point in the history
…on().
  • Loading branch information
Ryan Parman committed Oct 11, 2009
1 parent 0c4b4f5 commit c27a3fd
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
4 changes: 2 additions & 2 deletions _tests/sdb/batch_put_attributes.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ AmazonSDB::batch_put_attributes
));

// Success?
var_dump($response->status);
var_dump($response->isOK());
?>

--EXPECT--
int(200)
bool(true)
4 changes: 2 additions & 2 deletions _tests/sdb/batch_put_attributes2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ AmazonSDB::batch_put_attributes with replace all
), true);

// Success?
var_dump($response->status);
var_dump($response->isOK());
?>

--EXPECT--
int(200)
bool(true)
4 changes: 2 additions & 2 deletions _tests/sdb/z_delete_domain.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ AmazonSDB::delete_domain
$response = $sdb->delete_domain('warpshare-unit-test');

// Success?
var_dump($response->status);
var_dump($response->isOK());
?>

--EXPECT--
int(200)
bool(true)
Empty file removed _tests/sqs/__add_permission.php
Empty file.
23 changes: 23 additions & 0 deletions _tests/sqs/add_permission.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--TEST--
AmazonSQS::add_permission

--FILE--
<?php
// Dependencies
require_once dirname(__FILE__) . '/../../cloudfusion.class.php';

// Delete a queue
$sqs = new AmazonSQS();
$response = $sqs->add_permission('warpshare-unit-test', 'WarpShareTesting', array(
'133904017518' => array(
'GetQueueAttributes',
'ChangeVisbilityTimeout'
)
));

// Success?
var_dump($response->isOK());
?>

--EXPECT--
bool(true)
1 change: 1 addition & 0 deletions sqs.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ public function generate_policy()
* <ResponseCore> object
*
* Examples:
* example::sqs/add_permission.phpt:
*
* See Also:
* AWS Method - http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/index.html?Query_QueryAddPermission.html
Expand Down

0 comments on commit c27a3fd

Please sign in to comment.