mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fixed the test because libmysql results type is string. (#16709)
This commit is contained in:
@@ -11,16 +11,21 @@ MySQLPDOTest::skip();
|
||||
<?php
|
||||
require_once __DIR__ . '/inc/mysql_pdo_test.inc';
|
||||
|
||||
$pdo = MySQLPDOTest::factory(Pdo\Mysql::class, null, [PDO::ATTR_PERSISTENT => true], false);
|
||||
$attr = [
|
||||
PDO::ATTR_PERSISTENT => true,
|
||||
PDO::ATTR_STRINGIFY_FETCHES => true,
|
||||
];
|
||||
|
||||
$pdo = MySQLPDOTest::factory(Pdo\Mysql::class, null, $attr, false);
|
||||
var_dump($pdo->query('SELECT 1;')->fetchAll());
|
||||
|
||||
$pdo = MySQLPDOTest::factory(Pdo\Mysql::class, null, [PDO::ATTR_PERSISTENT => true], true);
|
||||
$pdo = MySQLPDOTest::factory(Pdo\Mysql::class, null, $attr, true);
|
||||
var_dump($pdo->query('SELECT 1;')->fetchAll());
|
||||
|
||||
$pdo = MySQLPDOTest::factory(Pdo::class, null, [PDO::ATTR_PERSISTENT => true], false);
|
||||
$pdo = MySQLPDOTest::factory(Pdo::class, null, $attr, false);
|
||||
var_dump($pdo->query('SELECT 1;')->fetchAll());
|
||||
|
||||
$pdo = MySQLPDOTest::factory(Pdo::class, null, [PDO::ATTR_PERSISTENT => true], true);
|
||||
$pdo = MySQLPDOTest::factory(Pdo::class, null, $attr, true);
|
||||
var_dump($pdo->query('SELECT 1;')->fetchAll());
|
||||
?>
|
||||
--EXPECT--
|
||||
@@ -28,35 +33,35 @@ array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
[1]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
[0]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
[1]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
[0]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
[1]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
[0]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
[1]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
[0]=>
|
||||
int(1)
|
||||
string(1) "1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user