$this->
assertTrue($schema->
hasTable('sessions'
));
} public function testConfigureSchemaTableExistsPdo() { $schema =
new Schema();
$schema->
createTable('sessions'
);
$pdoSessionHandler =
new PdoSessionHandler($this->
getMemorySqlitePdo());
$pdoSessionHandler->
configureSchema($schema,
fn () => true
);
$table =
$schema->
getTable('sessions'
);
$this->
assertEmpty($table->
getColumns(), 'The table was not overwritten'
);
} public static function provideUrlDsnPairs() { yield ['mysql://localhost/test', 'mysql:host=localhost;dbname=test;'
];
yield ['mysql://localhost/test?charset=utf8mb4', 'mysql:charset=utf8mb4;host=localhost;dbname=test;'
];
yield ['mysql://localhost/test?unix_socket=socket.sock&charset=utf8mb4', 'mysql:charset=utf8mb4;unix_socket=socket.sock;dbname=test;'
];
yield ['mysql://localhost:56/test', 'mysql:host=localhost;port=56;dbname=test;'
];
yield ['mysql2://root:pwd@localhost/test', 'mysql:host=localhost;dbname=test;', 'root', 'pwd'
];
yield ['postgres://localhost/test', 'pgsql:host=localhost;dbname=test;'
];
yield ['postgresql://localhost:5634/test', 'pgsql:host=localhost;port=5634;dbname=test;'
];