]> granicus.if.org Git - php/commitdiff
"transaction" tests should test commit, too, not only rollback
authorHartmut Holzgraefe <hholzgra@php.net>
Mon, 10 Jul 2006 16:29:24 +0000 (16:29 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Mon, 10 Jul 2006 16:29:24 +0000 (16:29 +0000)
ext/pdo/tests/pdo_017.phpt

index 6713bfda9dc7c95dd982561299cbbf93fd757bc7..651ee2860c5969b04669896255256832405578ff 100644 (file)
@@ -23,7 +23,7 @@ if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
 ?>
 --FILE--
 <?php
-if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); 
+if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
 require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
 $db = PDOTest::factory();
 
@@ -56,8 +56,17 @@ $db->rollBack();
 
 echo countRows('rollback');
 
+$db->beginTransaction();
+$delete->execute();
+echo countRows('delete');
+$db->commit();
+
+echo countRows('commit');
+
 ?>
 --EXPECT--
 Counted 3 rows after insert.
 Counted 0 rows after delete.
 Counted 3 rows after rollback.
+Counted 0 rows after delete.
+Counted 0 rows after commit.