Skip to content

Commit 431d7e2

Browse files
Improve ext/pdo_pgsql tests cleanup
1 parent 6c29ac3 commit 431d7e2

8 files changed

+14
-0
lines changed

ext/pdo_pgsql/tests/bug70861.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ $stmt->execute();
4141

4242
fclose($f);
4343

44+
$db->exec('DROP TABLE test_blob_crash');
45+
4446
?>
4547
+++DONE+++
4648
--EXPECTF--

ext/pdo_pgsql/tests/bug75402.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ if ($db) {
7979
}
8080
$stmt->closeCursor();
8181
$stmt = null;
82+
83+
$db->exec('DROP TABLE bug75402');
8284
$db = null;
8385
}
8486

ext/pdo_pgsql/tests/bug_33876.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ if (!$res->execute(array(false))) {
8888
print_r($res->fetchAll(PDO::FETCH_ASSOC));
8989
}
9090

91+
$db->exec('DROP TABLE test');
92+
9193
function normalizeErrorInfo(array $err): array {
9294
// Strip additional lines outputted by recent PgSQL versions
9395
$err[2] = trim(current(explode("\n", $err[2])));

ext/pdo_pgsql/tests/bug_49985.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ for ($i = 0; $i < 3; $i++) {
2929
}
3030
}
3131

32+
$db->exec('DROP TABLE test');
33+
3234
?>
3335
--EXPECTF--
3436
bool(true)

ext/pdo_pgsql/tests/copy_from.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ $db->rollback();
125125
foreach (array($filename, $filenameWithDifferentNullValues, $filenameWithDifferentNullValuesAndSelectedFields) as $f) {
126126
@unlink($f);
127127
}
128+
129+
$db->exec('DROP TABLE test');
128130
?>
129131
--EXPECTF--
130132
Preparing test file and array for CopyFrom tests

ext/pdo_pgsql/tests/copy_to.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ try {
7878
if(isset($filename)) {
7979
@unlink($filename);
8080
}
81+
82+
$db->exec('DROP TABLE test');
8183
?>
8284
--EXPECTF--
8385
Preparing test table for CopyTo tests

ext/pdo_pgsql/tests/is_in_transaction.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var_dump($db->inTransaction());
5656
var_dump($e->getMessage());
5757
}
5858

59+
$db->exec('DROP TABLE test');
5960
?>
6061
--EXPECT--
6162
Test PDO::PGSQL_TRANSACTION_INTRANS

ext/pdo_pgsql/tests/large_objects.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ echo "Fetched!\n";
7878
* linger and clutter up the storage */
7979
$db->pgsqlLOBUnlink($oid);
8080

81+
$db->exec('DROP TABLE test');
8182
?>
8283
--EXPECT--
8384
Fetching:

0 commit comments

Comments
 (0)