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 99class ConnectionOptionsTest extends \PHPUnit_Framework_TestCase
1010{
1111 /**
12- * Tests Connection Options getters and setters. Only necessary for code coverage.
12+ * Tests Connection Options getters and setters.
1313 *
1414 * @return void
1515 */
@@ -37,4 +37,32 @@ public function testSettersAndGetters()
3737 $ this ->assertTrue ($ options ->isPedantic ());
3838 $ this ->assertTrue ($ options ->isReconnect ());
3939 }
40+
41+ /**
42+ * Tests Connection Options getters and setters without setting user and password.
43+ *
44+ * @return void
45+ */
46+ public function testSettersAndGettersWithoutCredentials ()
47+ {
48+ $ options = new ConnectionOptions ();
49+ $ options
50+ ->setHost ('host ' )
51+ ->setPort (4222 )
52+ ->setLang ('lang ' )
53+ ->setVersion ('version ' )
54+ ->setVerbose (true )
55+ ->setPedantic (true )
56+ ->setReconnect (true );
57+
58+ $ this ->assertEquals ('host ' , $ options ->getHost ());
59+ $ this ->assertEquals (4222 , $ options ->getPort ());
60+ $ this ->assertNull ($ options ->getUser ());
61+ $ this ->assertNull ($ options ->getPass ());
62+ $ this ->assertEquals ('lang ' , $ options ->getLang ());
63+ $ this ->assertEquals ('version ' , $ options ->getVersion ());
64+ $ this ->assertTrue ($ options ->isVerbose ());
65+ $ this ->assertTrue ($ options ->isPedantic ());
66+ $ this ->assertTrue ($ options ->isReconnect ());
67+ }
4068}
You can’t perform that action at this time.
0 commit comments