+17
-2
lines changedFilter options
+17
-2
lines changed Original file line number Diff line number Diff line change
@@ -70,12 +70,12 @@ class PostgresAdapter extends PdoAdapter
70
70
*/
71
71
public function setOptions(array $options): AdapterInterface
72
72
{
73
-
parent::setOptions($options);
74
-
75
73
if (!empty($options['schema'])) {
76
74
$this->schema = $options['schema'];
77
75
}
78
76
77
+
parent::setOptions($options);
78
+
79
79
return $this;
80
80
}
81
81
Original file line number Diff line number Diff line change
@@ -148,6 +148,21 @@ public function testConnectionWithSchema()
148
148
$this->assertTrue($adapter->hasTable('foo.' . $adapter->getSchemaTableName()));
149
149
}
150
150
151
+
public function testConnectionWithSchemaAndConnection()
152
+
{
153
+
$this->adapter->connect();
154
+
$this->adapter->createSchema('foo');
155
+
156
+
$options = [
157
+
'schema' => 'foo',
158
+
'connection' => $this->adapter->getConnection(),
159
+
'name' => PGSQL_DB_CONFIG['name'],
160
+
];
161
+
$adapter = new PostgresAdapter($options, new ArrayInput([]), new NullOutput());
162
+
$adapter->connect();
163
+
$this->assertTrue($adapter->hasTable('foo.' . $adapter->getSchemaTableName()));
164
+
}
165
+
151
166
public function testCreatingTheSchemaTableOnConnect()
152
167
{
153
168
$this->adapter->connect();
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4