Skip to content

Commit 590ad66

Browse files
committed
Add missing test
1 parent 1d45854 commit 590ad66

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/bug33707.phpt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
--TEST--
2+
PDO OCI Bug #33707 (Errors in select statements not reported)
3+
--EXTENSIONS--
4+
pdo
5+
pdo_oci
6+
--SKIPIF--
7+
<?php
8+
require(getenv('PDO_TEST_DIR').'/pdo_test.inc');
9+
PDOTest::skip();
10+
?>
11+
--FILE--
12+
<?php
13+
require_once(getenv('PDO_TEST_DIR').'/pdo_test.inc');
14+
$db = PDOTest::test_factory(getenv('PDO_OCI_TEST_DIR').'/common.phpt');
15+
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
16+
17+
$rs = $db->query('select blah from a_table_that_does_not_exist');
18+
var_dump($rs);
19+
var_dump($db->errorInfo());
20+
?>
21+
--EXPECTF--
22+
bool(false)
23+
array(3) {
24+
[0]=>
25+
string(5) "HY000"
26+
[1]=>
27+
int(942)
28+
[2]=>
29+
string(%d) "OCIStmtExecute: ORA-00942: table or view %Sdoes not exist
30+
(%s:%d)"
31+
}

0 commit comments

Comments
 (0)