Skip to content

Commit

Permalink
Add port to connection string (#190)
Browse files Browse the repository at this point in the history
* Remove boolean literal from sqlite tests

* Null check of row's first field

* Add missing port configuration in connection string
  • Loading branch information
g105b authored Jul 5, 2020
1 parent 5ed2225 commit 96cb700
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Connection/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public function getConnectionString():string {

default:
$connectionString .= "host=" . $this->getHost();
$connectionString .= ";port=" . $this->getPort();
$connectionString .= ";dbname=" . $this->getSchema();
$connectionString .= ";charset=" . self::CHARSET;
break;
Expand Down
2 changes: 2 additions & 0 deletions test/unit/Connection/SettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ public function testGetConnectionString() {
$this->properties["driver"],
":host=",
$this->properties["host"],
";port=",
$this->properties["port"],
";dbname=",
$this->properties["database"],
";charset=",
Expand Down

0 comments on commit 96cb700

Please sign in to comment.