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

Commit 16dd6c3

Browse files
committed
Added test for string representation of ConnectionOptions with
credentials
1 parent bcf7b91 commit 16dd6c3

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

tests/Unit/ConnectionOptionsTest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testSettersAndGettersWithoutCredentials()
6767
}
6868

6969
/**
70-
* Test string representation of ConnectionOptions
70+
* Test string representation of ConnectionOptions.
7171
*
7272
* @return void
7373
*/
@@ -76,4 +76,17 @@ public function testStringRepresentation()
7676
$options = new ConnectionOptions();
7777
$this->assertEquals("{\"lang\":\"php\",\"version\":\"0.0.5\",\"verbose\":false,\"pedantic\":false}", $options->__toString());
7878
}
79+
80+
/**
81+
* Test string representation of ConnectionOptions with credentials.
82+
*
83+
* @return void
84+
*/
85+
public function testStringRepresentationWithCredentials()
86+
{
87+
$options = new ConnectionOptions();
88+
$options->setUser("username");
89+
$options->setPass("password");
90+
$this->assertEquals("{\"lang\":\"php\",\"version\":\"0.0.5\",\"verbose\":false,\"pedantic\":false,\"user\":\"username\",\"pass\":\"password\"}", $options->__toString());
91+
}
7992
}

0 commit comments

Comments
 (0)