Skip to content

Commit 10b02c5

Browse files
committed
add more ddl test
1 parent eed8620 commit 10b02c5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

ext/pdo_firebird/tests/ddl2.phpt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--TEST--
2+
PDO_Firebird: DDL/transactions 2
3+
--EXTENSIONS--
4+
pdo_firebird
5+
--SKIPIF--
6+
<?php require('skipif.inc'); ?>
7+
--ENV--
8+
LSAN_OPTIONS=detect_leaks=0
9+
--FILE--
10+
<?php
11+
require("testdb.inc");
12+
13+
$dbh->exec("CREATE TABLE test_ddl2 (val int)");
14+
15+
$dbh->beginTransaction();
16+
$dbh->exec("INSERT INTO test_ddl2 (val) VALUES (120)");
17+
$dbh->exec("CREATE TABLE test_ddl2_2 (val INT)");
18+
$dbh->rollback();
19+
20+
$result = $dbh->query("SELECT * FROM test_ddl2");
21+
foreach ($result as $r) {
22+
var_dump($r);
23+
}
24+
25+
unset($dbh);
26+
echo "done\n";
27+
?>
28+
--CLEAN--
29+
<?php
30+
require("testdb.inc");
31+
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
32+
@$dbh->exec('DROP TABLE test_ddl2');
33+
@$dbh->exec('DROP TABLE test_ddl2_2');
34+
?>
35+
--EXPECT--
36+
done

0 commit comments

Comments
 (0)