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

Commit e8d5a5c

Browse files
committed
Check default vaules of connection
1 parent d4da55d commit e8d5a5c

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

spec/Nats/ConnectionSpec.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
namespace spec\Nats;
3+
4+
use PhpSpec\ObjectBehavior;
5+
use Prophecy\Argument;
6+
7+
class ConnectionSpec extends ObjectBehavior
8+
{
9+
function it_is_initializable()
10+
{
11+
$this->shouldHaveType('Nats\Connection');
12+
}
13+
14+
function it_has_ping_count_to_zero()
15+
{
16+
$this->pingsCount()->shouldBe(0);
17+
}
18+
19+
function it_has_pubs_count_to_zero()
20+
{
21+
$this->pubsCount()->shouldBe(0);
22+
}
23+
24+
function it_has_reconnects_count_to_zero()
25+
{
26+
$this->reconnectsCount()->shouldBe(0);
27+
}
28+
29+
function it_has_subscriptions_count_to_zero()
30+
{
31+
$this->subscriptionsCount()->shouldBe(0);
32+
}
33+
34+
function it_subscriptions_array_is_empty()
35+
{
36+
$this->getSubscriptions()->shouldHaveCount(0);
37+
}
38+
}

0 commit comments

Comments
 (0)