Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change detailed history tests to retrieve only 5.

  • Loading branch information...
commit 4efff4331034e6f3fcdab12102735e3c73644b54 1 parent 1420866
geremy cohen authored
View
4 php/3.3/Pubnub.php
@@ -237,12 +237,10 @@ public function decodeAndDecrypt($messages, $mode = "default")
{
$receivedMessages = array();
-
if ($mode == "presence") {
return $messages;
} elseif ($mode == "default") {
-
$messageArray = $messages;
$receivedMessages = $this->decodeDecryptLoop($messageArray);
@@ -250,11 +248,9 @@ public function decodeAndDecrypt($messages, $mode = "default")
$messageArray = $messages[0];
$receivedMessages = $this->decodeDecryptLoop($messageArray);
-
}
return $receivedMessages;
-
}
public function decodeDecryptLoop($messageArray)
View
22 php/3.3/pubnubCipherTextTests.php
@@ -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
View
22 php/3.3/pubnubPlaintextTests.php
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.