Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit b9d249d

Browse files
author
Raül Pérez
committed
Added version
1 parent 6e4aa71 commit b9d249d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/Connection.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
*/
2424
class Connection
2525
{
26+
/**
27+
* Version number
28+
*/
29+
const VERSION = "0.0.3";
30+
2631
/**
2732
* Number of PINGS
2833
*
@@ -198,7 +203,8 @@ private function _getStream($address)
198203
*
199204
* @return bool
200205
*/
201-
public function isConnected() {
206+
public function isConnected()
207+
{
202208
return isset($this->_streamSocket);
203209
}
204210

tests/Unit/ConnectionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ public function testSubscription()
119119
{
120120
$callback = function ($message) {
121121
$this->assertNotNull($message);
122+
$this->assertEquals($message, "bar");
122123
};
123124
$this->_c->subscribe("foo", $callback);
124125
$this->assertGreaterThan(0, $this->_c->subscriptionsCount());
126+
125127
$subscriptions = $this->_c->getSubscriptions();
126128
$this->assertInternalType("array", $subscriptions);
127129

0 commit comments

Comments
 (0)