-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add mandatory UUID * Fixes in tests * additional validation and tests * PubNub SDK v5.0.0 release. Co-authored-by: Client Engineering Bot <60980775+Client Engineering [email protected]>
- Loading branch information
Showing
13 changed files
with
120 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace PubNub\Exceptions; | ||
|
||
class PubNubConfigurationException extends PubNubException | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace Tests\Functional; | ||
|
||
use PubNub\Exceptions\PubNubConfigurationException; | ||
use PubNubTestCase; | ||
use PubNub\Exceptions\PubNubValidationException; | ||
use PubNub\PNConfiguration; | ||
use PubNub\PubNub; | ||
|
||
class UuidTest extends PubNubTestCase | ||
{ | ||
public function testValidateOnSet() | ||
{ | ||
$this->expectException(PubNubConfigurationException::class); | ||
$this->expectExceptionMessage("UUID should not be empty"); | ||
$config = new PNConfiguration(); | ||
$config->setPublishKey('fake') | ||
->setSubscribeKey('fake') | ||
->setUuid([123]); | ||
} | ||
|
||
public function testValidateOnSetWhitespace() | ||
{ | ||
$this->expectException(PubNubConfigurationException::class); | ||
$this->expectExceptionMessage("UUID should not be empty"); | ||
$config = new PNConfiguration(); | ||
$config->setPublishKey('fake') | ||
->setSubscribeKey('fake') | ||
->setUuid(" "); | ||
} | ||
|
||
public function testValidateOnInit() | ||
{ | ||
$this->expectException(PubNubConfigurationException::class); | ||
$this->expectExceptionMessage("UUID should not be empty"); | ||
$config = new PNConfiguration(); | ||
$config->setPublishKey('fake') | ||
->setSubscribeKey('fake'); | ||
|
||
new PubNub($config); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters