__toString() public method

Get the options JSON string.
public __toString ( ) : string
return string
Exemplo n.º 1
0
 /**
  * Test string representation of ConnectionOptions with credentials.
  *
  * @return void
  */
 public function testStringRepresentationWithCredentials()
 {
     $options = new ConnectionOptions();
     $options->setUser("username");
     $options->setPass("password");
     $this->assertEquals("{\"lang\":\"php\",\"version\":\"0.8.0\",\"verbose\":false,\"pedantic\":false,\"user\":\"username\",\"pass\":\"password\"}", $options->__toString());
 }