mirror of
https://github.com/php/php-src.git
synced 2024-11-23 01:44:06 +08:00
Fixed the test because libmysql results type is string. (#16709)
closes #16709
This commit is contained in:
parent
a800a03562
commit
5faef8e6c9
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user