This repository was archived by the owner on Oct 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Created by PhpStorm.
4+ * User: isselguberna
5+ * Date: 29/9/15
6+ * Time: 23:48
7+ */
8+
9+ namespace Nats \tests \Unit ;
10+
11+ use Nats \ConnectionOptions ;
12+
13+ class ConnectionOptionsTest extends \PHPUnit_Framework_TestCase
14+ {
15+ /**
16+ * Tests Connection Options getters and setters. Only necessary for code coverage.
17+ */
18+ public function testSettersAndGetters ()
19+ {
20+ $ options = new ConnectionOptions ();
21+ $ options
22+ ->setHost ('host ' )
23+ ->setPort (4222 )
24+ ->setUser ('user ' )
25+ ->setPass ('password ' )
26+ ->setLang ('lang ' )
27+ ->setVersion ('version ' )
28+ ->setVerbose (true )
29+ ->setPedantic (true )
30+ ->setReconnect (true );
31+
32+ $ this ->assertEquals ('host ' , $ options ->getHost ());
33+ $ this ->assertEquals (4222 , $ options ->getPort ());
34+ $ this ->assertEquals ('user ' , $ options ->getUser ());
35+ $ this ->assertEquals ('password ' , $ options ->getPass ());
36+ $ this ->assertEquals ('lang ' , $ options ->getLang ());
37+ $ this ->assertEquals ('version ' , $ options ->getVersion ());
38+ $ this ->assertTrue ($ options ->isVerbose ());
39+ $ this ->assertTrue ($ options ->isPedantic ());
40+ $ this ->assertTrue ($ options ->isReconnect ());
41+ }
42+ }
You can’t perform that action at this time.
0 commit comments