diff --git a/src/Connection/Settings.php b/src/Connection/Settings.php index 357b840..0ef81e7 100644 --- a/src/Connection/Settings.php +++ b/src/Connection/Settings.php @@ -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; diff --git a/test/unit/Connection/SettingsTest.php b/test/unit/Connection/SettingsTest.php index c82f64b..d691985 100644 --- a/test/unit/Connection/SettingsTest.php +++ b/test/unit/Connection/SettingsTest.php @@ -132,6 +132,8 @@ public function testGetConnectionString() { $this->properties["driver"], ":host=", $this->properties["host"], + ";port=", + $this->properties["port"], ";dbname=", $this->properties["database"], ";charset=",