mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00
Add basic libmysqlclient CI job
This tests that mysqli and pdo_mysql build against libmysqlclient, and that tests pass for pdo_mysql. mysqli has too many test failures. This is not an officially supported configuration.
This commit is contained in:
parent
037512cfce
commit
7a5cc7aa67
4 changed files with 103 additions and 4 deletions
|
@ -47,14 +47,21 @@ MySQLPDOTest::skip();
|
|||
$db = new PDO($uri, $user, $pass);
|
||||
} catch (PDOException $e) {
|
||||
$expected = array(
|
||||
"SQLSTATE[HY000] [1049] Unknown database 'letshopeinvalid'",
|
||||
"SQLSTATE[42000] [1049] Unknown database 'letshopeinvalid'",
|
||||
"SQLSTATE[HY000] [2002] No such file or directory"
|
||||
"SQLSTATE[HY000] [1049]",
|
||||
"SQLSTATE[42000] [1049]",
|
||||
"SQLSTATE[HY000] [2002]"
|
||||
);
|
||||
$isExpected = false;
|
||||
foreach ($expected as $prefix) {
|
||||
if (str_starts_with($e->getMessage(), $prefix)) {
|
||||
$isExpected = true;
|
||||
}
|
||||
}
|
||||
|
||||
printf("[003] URI=%s, DSN=%s, File=%s (%d bytes, '%s'), chr(0) test, %s\n",
|
||||
$uri, $dsn,
|
||||
$file, filesize($file), file_get_contents($file),
|
||||
(in_array($e->getMessage(), $expected) ? 'EXPECTED ERROR' : $e->getMessage()));
|
||||
($isExpected ? 'EXPECTED ERROR' : $e->getMessage()));
|
||||
}
|
||||
unlink($file);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue