Skip to content

Commit

Permalink
Merge pull request #13 from stefan-qsd/feature/travisPHPVersions
Browse files Browse the repository at this point in the history
- Update PHP versions and distribution to xenial in .travis.yml.
- Fix test issues in PHP versions 7.2 and 7.3.
  • Loading branch information
qsdstefan authored Oct 24, 2019
2 parents 46136b7 + 77e2a92 commit 82c39d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
language: php
dist: trusty
dist: xenial
sudo: false
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
install:
- composer self-update && composer --version
- composer install --prefer-dist
Expand Down
3 changes: 2 additions & 1 deletion src/PubNub/Endpoints/Presence/WhereNow.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use PubNub\Exceptions\PubNubValidationException;
use PubNub\Models\Consumer\Presence\PNWhereNowResult;
use PubNub\PubNub;
use PubNub\PubNubUtil;


class WhereNow extends Endpoint
Expand Down Expand Up @@ -73,7 +74,7 @@ public function buildPath()
{
return sprintf(WhereNow::PATH,
$this->pubnub->getConfiguration()->getSubscribeKey(),
$this->uuid
PubNubUtil::urlEncode($this->uuid)
);
}

Expand Down
3 changes: 2 additions & 1 deletion tests/integrational/HereNowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tests\Integrational;

use Countable;
use PubNub\Endpoints\Presence\HereNow;
use PubNub\Exceptions\PubNubValidationException;
use RawTransport;
Expand Down Expand Up @@ -129,7 +130,7 @@ public function testMultipleChannelWithoutStateUUIDs()

$this->assertEquals($response->getChannels()[0]->getChannelName(), "game1");
$this->assertEquals($response->getChannels()[0]->getOccupancy(), 1);
$this->assertEquals(count($response->getChannels()[0]->getOccupants()), null);
$this->assertEquals(is_array($response->getChannels()[0]->getOccupants()) , false);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/integrational/HistoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function testEncryptedSuccess()

$this->assertEquals(count($response->getMessages()), 3);

$this->assertEquals(count($response->getMessages()[0]->getTimetoken()), null);
$this->assertEquals($response->getMessages()[0]->getTimetoken(), NULL);
$this->assertEquals($response->getMessages()[0]->getEntry()[0], "m1");
$this->assertEquals($response->getMessages()[0]->getEntry()[1], "m2");
$this->assertEquals($response->getMessages()[0]->getEntry()[2], "m3");
Expand Down

0 comments on commit 82c39d7

Please sign in to comment.