PHP  
 PHP_7_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Expected Test Failure Report for ext/pdo_oci/tests/pdo_022.phpt ('OCI PDO Common: PDOStatement::getColumnMeta')

Script

1: <?php
2:
if (getenv('REDIR_TEST_DIR') === falseputenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
3: require_once 
getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
4:
$db PDOTest::factory();
5:
6:
$db->exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))');
7:
$db->exec('insert2'"INSERT INTO test VALUES(:first, :second, :third)");
8:
9:
$data = array(
10:     array(
'10''Abc''zxy'),
11:     array(
'20''Def''wvu'),
12:     array(
'30''Ghi''tsr'),
13:     array(
'40''Jkl''qpo'),
14:     array(
'50''Mno''nml'),
15:     array(
'60''Pqr''kji'),
16: );
17:
18:
19:
// Insert using question mark placeholders
20:
$stmt $db->prepare("INSERT INTO test VALUES(?, ?, ?)");
21: foreach (
$data as $row) {
22:     
$stmt->execute($row);
23: }
24:
25:
// Retrieve column metadata for a result set returned by explicit SELECT
26:
$select $db->query('SELECT id, val, val2 FROM test');
27:
$meta $select->getColumnMeta(0);
28:
var_dump($meta);
29:
$meta $select->getColumnMeta(1);
30:
var_dump($meta);
31:
$meta $select->getColumnMeta(2);
32:
var_dump($meta);
33:
34:
// Retrieve column metadata for a result set returned by a function
35:
$select $db->query('SELECT COUNT(*) FROM test');
36:
$meta $select->getColumnMeta(0);
37:
var_dump($meta);
38:
39:
?>
40:

Expected

The unexpected!

Output

Warning: PDO::exec() expects exactly 1 parameter, 2 given in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 7

Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 27
bool(false)

Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 29
bool(false)

Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 31
bool(false)

Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 36
bool(false)

Diff

# original source file: ext/pdo/tests/pdo_022.phpt
001+ Warning: PDO::exec() expects exactly 1 parameter, 2 given in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 7
001- The unexpected!
002+ 
003+ Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 27
004+ bool(false)
005+ 
006+ Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 29
007+ bool(false)
008+ 
009+ Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 31
010+ bool(false)
011+ 
012+ Warning: PDOStatement::getColumnMeta(): SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data in /var/php_gcov/PHP_7_3/ext/pdo_oci/tests/pdo_022.php on line 36
013+ bool(false)

 

Generated at Tue, 10 Sep 2019 23:15:19 +0000 (6 days ago)

Copyright © 2005-2019 The PHP Group
All rights reserved.