Skip to content

Commit

Permalink
Fix PDO_OCI test
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbj committed Dec 24, 2020
1 parent 959d3c9 commit 34aefa3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ SQL
}

// invalid offset
$tmp = @$stmt->getColumnMeta(-1);
printf(" 1.3 Expecting false got %s\n", var_export($tmp, true));
echo " 1.3 ";
try {
$tmp = $stmt->getColumnMeta(-1);
} catch (ValueError $e) {
if (false !== $tmp) {
printf("[1.3] Expecting false got %s\n", var_export($tmp, true));
}
echo $e->getMessage(), "\n";
}

// PDOStatement::getColumnMeta(): Argument #1 must be of type int, array given in
echo " 1.4 ";
Expand Down Expand Up @@ -311,7 +318,7 @@ Preparations before the test
Test 1. calling function with invalid parameters
1.1 Expecting false got false
1.2 PDOStatement::getColumnMeta() expects exactly 1 argument, 0 given
1.3 Expecting false got false
1.3 PDOStatement::getColumnMeta(): Argument #1 ($column) must be greater than or equal to 0
1.4 PDOStatement::getColumnMeta(): Argument #1 ($column) must be of type int, array given
1.5 PDOStatement::getColumnMeta() expects exactly 1 argument, 2 given
1.6 Expecting false because of invalid offset got false
Expand Down

0 comments on commit 34aefa3

Please sign in to comment.