Permalink
Browse files

Change detailed history tests to retrieve only 5.

  • Loading branch information...
1 parent 1420866 commit 4efff4331034e6f3fcdab12102735e3c73644b54 geremy cohen committed Sep 4, 2012
Showing with 22 additions and 26 deletions.
  1. +0 −4 php/3.3/Pubnub.php
  2. +11 −11 php/3.3/pubnubCipherTextTests.php
  3. +11 −11 php/3.3/pubnubPlaintextTests.php
View
@@ -237,24 +237,20 @@ public function decodeAndDecrypt($messages, $mode = "default")
{
$receivedMessages = array();
-
if ($mode == "presence") {
return $messages;
} elseif ($mode == "default") {
-
$messageArray = $messages;
$receivedMessages = $this->decodeDecryptLoop($messageArray);
} elseif ($mode == "detailedHistory") {
$messageArray = $messages[0];
$receivedMessages = $this->decodeDecryptLoop($messageArray);
-
}
return $receivedMessages;
-
}
public function decodeDecryptLoop($messageArray)
@@ -109,7 +109,7 @@
echo "Running detailedHistory\r\n";
$history = $pubnub->detailedHistory(array(
'channel' => $channel,
- 'count' => 10,
+ 'count' => 5,
'end' => "13466530169226760"
));
print_r($history);
@@ -147,16 +147,16 @@
## ---------------------------------------------------------------------------
## Presence Example
## ---------------------------------------------------------------------------
-echo("\nWaiting for Presence message... Hit CTRL+C to finish.\n");
-
-$pubnub->presence(array(
- 'channel' => $channel,
- 'callback' => function($message) {
- print_r($message);
- echo "\r\n";
- return false;
- }
-));
+//echo("\nWaiting for Presence message... Hit CTRL+C to finish.\n");
+//
+//$pubnub->presence(array(
+// 'channel' => $channel,
+// 'callback' => function($message) {
+// print_r($message);
+// echo "\r\n";
+// return false;
+// }
+//));
## ---------------------------------------------------------------------------
## Subscribe Example
@@ -81,7 +81,7 @@
echo "Running detailedHistory\r\n";
$history = $pubnub->detailedHistory(array(
'channel' => $channel,
- 'count' => 10,
+ 'count' => 5,
'end' => "13466530169226760"
));
print_r($history);
@@ -108,16 +108,16 @@
## ---------------------------------------------------------------------------
## Presence Example
## ---------------------------------------------------------------------------
-//echo("\nWaiting for Presence message... Hit CTRL+C to finish.\n");
-//
-//$pubnub->presence(array(
-// 'channel' => $channel,
-// 'callback' => function($message) {
-// print_r($message);
-// echo "\r\n";
-// return true;
-// }
-//));
+echo("\nWaiting for Presence message... Hit CTRL+C to finish.\n");
+
+$pubnub->presence(array(
+ 'channel' => $channel,
+ 'callback' => function($message) {
+ print_r($message);
+ echo "\r\n";
+ return true;
+ }
+));
## ---------------------------------------------------------------------------
## Subscribe Example

0 comments on commit 4efff43

Please sign in to comment.