You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
When using odbc and freetds to access MS SQL Server from a Linux environment, dbunit fails with an error about a missing metadata driver (no meta data driver for odbc).
A simple work around is to create a subclass of the PDO class you want to test:
/**
* In my application...
*/
class PDO_MsSql extends PDO {
...
}
/**
* In my test code...
*/
class Testing_PDO_MsSqlTest extends PDO_MsSql {
...
public function getAttribute( $attribute ) {
if( $attribute === PDO::ATTR_DRIVER_NAME && PHP_OS === 'Linux' ) {
return 'sqlsrv';
} else {
return parent::getAttribute( $attribute );
}
}
}
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.
When using odbc and freetds to access MS SQL Server from a Linux environment, dbunit fails with an error about a missing metadata driver (no meta data driver for odbc).
A simple work around is to create a subclass of the PDO class you want to test:
The text was updated successfully, but these errors were encountered: