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

Commit 53d397d

Browse files
committed
check reconnection and ping counts
1 parent 7f26b27 commit 53d397d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

spec/Nats/ConnectionSpec.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,18 @@ function it_can_connect_and_disconnect_with_default_options()
4949
$this->close();
5050
$this->isConnected()->shouldBe(false);
5151
}
52+
53+
function it_increases_reconnects_count_on_each_reconnection()
54+
{
55+
$this->connect();
56+
$this->reconnect();
57+
$this->reconnectsCount()->shouldBe(1);
58+
$this->isConnected()->shouldBe(true);
59+
}
60+
61+
function it_a_ping_is_sent_after_a_successful_connection()
62+
{
63+
$this->connect();
64+
$this->pingsCount()->shouldBe(1);
65+
}
5266
}

0 commit comments

Comments
 (0)