1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix test on 8.4+ (#20196)

* Fix test on 8.4+

* more fixes

* Fix include path
This commit is contained in:
Niels Dossche
2025-10-17 09:12:10 +02:00
committed by GitHub
parent 6980d51f52
commit a576a3d5d4

View File

@@ -8,16 +8,15 @@ pdo_mysql
require_once __DIR__ . '/inc/mysql_pdo_test.inc';
MySQLPDOTest::skip();
?>
--XFAIL--
--FILE--
<?php
require_once __DIR__ . '/inc/mysql_pdo_test.inc';
$pdo = MySQLPDOTest::factory();
$db = MySQLPDOTest::factory();
$db->exec('CREATE TABLE test (bar JSON)');
$db->exec('INSERT INTO test VALUES("[]")');
$db->exec('CREATE TABLE test_gh20122 (bar JSON)');
$db->exec('INSERT INTO test_gh20122 VALUES("[]")');
$stmt = $db->query('SELECT * from test');
$stmt = $db->query('SELECT * from test_gh20122');
$meta = $stmt->getColumnMeta(0);
// Note: JSON is an alias for LONGTEXT on MariaDB!
@@ -25,8 +24,9 @@ echo $meta['native_type'], "\n";
?>
--CLEAN--
<?php
require __DIR__ . '/mysql_pdo_test.inc';
MySQLPDOTest::dropTestTable();
require_once __DIR__ . '/inc/mysql_pdo_test.inc';
$pdo = MySQLPDOTest::factory();
$pdo->query('DROP TABLE IF EXISTS test_gh20122');
?>
--EXPECTF--
%r(JSON|LONGTEXT)%r