Skip to content

Commit 394386a

Browse files
committed
Fix the rest of the tests
1 parent df0b902 commit 394386a

21 files changed

+36
-38
lines changed

ext/pdo/tests/bug_36798.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $db = PDOTest::factory();
2929
$db->exec("CREATE TABLE test36798 (id INTEGER)");
3030
$db->exec("INSERT INTO test36798 (id) VALUES (1)");
3131

32-
$stmt = $db->prepare("SELECT 'Ã' as test FROM test36798 WHERE id = :id");
32+
$stmt = $db->prepare("SELECT '' as test FROM test36798 WHERE id = :id");
3333
$stmt->execute(array(":id" => 1));
3434

3535
$row = $stmt->fetch(PDO::FETCH_NUM);
@@ -45,5 +45,5 @@ PDOTest::dropTableIfExists($db, "test36798");
4545
--EXPECT--
4646
array(1) {
4747
[0]=>
48-
string(2) "Ã"
48+
string(1) ""
4949
}

ext/pdo/tests/pdo_test.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class PDOTest {
8787
END;
8888
SQL
8989
),
90-
"firebird" => $db->exec("DROP TABLE $tableName"),
90+
"firebird" => @$db->exec("DROP TABLE $tableName"),
9191
default => $db->exec("DROP TABLE IF EXISTS $tableName"),
9292
};
9393
}

ext/pdo_firebird/tests/bug_47415.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ unset($dbh);
3939
--CLEAN--
4040
<?php
4141
require 'testdb.inc';
42-
$dbh->exec("DROP TABLE test47415");
42+
@$dbh->exec("DROP TABLE test47415");
4343
?>
4444
--EXPECT--
4545
bool(false)

ext/pdo_firebird/tests/bug_48877.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ unset($dbh);
4040
--CLEAN--
4141
<?php
4242
require 'testdb.inc';
43-
$dbh->exec("DROP TABLE test48877");
43+
@$dbh->exec("DROP TABLE test48877");
4444
?>
4545
--EXPECT--
4646
bool(false)

ext/pdo_firebird/tests/bug_53280.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ unset($dbh);
3838
--CLEAN--
3939
<?php
4040
require 'testdb.inc';
41-
$dbh->exec("DROP TABLE test53280");
41+
@$dbh->exec("DROP TABLE test53280");
4242
?>
4343
--EXPECT--
4444
array(1) {

ext/pdo_firebird/tests/bug_62024.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ unset($dbh);
4646
--CLEAN--
4747
<?php
4848
require 'testdb.inc';
49-
$dbh->exec("DROP TABLE test62024");
49+
@$dbh->exec("DROP TABLE test62024");
5050
?>
5151
--EXPECT--
5252
bool(true)

ext/pdo_firebird/tests/bug_64037.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ unset($dbh);
4040
--CLEAN--
4141
<?php
4242
require 'testdb.inc';
43-
$dbh->exec("DROP TABLE test64037");
43+
@$dbh->exec("DROP TABLE test64037");
4444
?>
4545
--EXPECT--
4646
string(5) "-1.00"

ext/pdo_firebird/tests/bug_72583.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ unset($dbh);
2222
--CLEAN--
2323
<?php
2424
require 'testdb.inc';
25-
$dbh->exec("DROP TABLE test72583");
25+
@$dbh->exec("DROP TABLE test72583");
2626
?>
2727
--EXPECT--
2828
integer

ext/pdo_firebird/tests/bug_72931.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ unset($dbh);
2121
--CLEAN--
2222
<?php
2323
require 'testdb.inc';
24-
$dbh->exec("DROP TABLE test72931");
24+
@$dbh->exec("DROP TABLE test72931");
2525
?>
2626
--EXPECT--
2727
1

ext/pdo_firebird/tests/bug_73087.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ echo 'OK';
2828
--CLEAN--
2929
<?php
3030
require 'testdb.inc';
31-
$dbh->exec("DROP TABLE test73087");
31+
@$dbh->exec("DROP TABLE test73087");
3232
?>
3333
--EXPECT--
3434
OK

ext/pdo_firebird/tests/bug_74462.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var_dump($D);
2323
--CLEAN--
2424
<?php
2525
require 'testdb.inc';
26-
$dbh->exec("DROP TABLE test74462");
26+
@$dbh->exec("DROP TABLE test74462");
2727
?>
2828
--EXPECT--
2929
array(3) {

ext/pdo_firebird/tests/bug_80521.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ object(PDOStatement)#%d (1) {
2121
--CLEAN--
2222
<?php
2323
require 'testdb.inc';
24-
$dbh->exec("DROP TABLE bug80521");
24+
@$dbh->exec("DROP TABLE bug80521");
2525
?>

ext/pdo_firebird/tests/bug_aaa.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LSAN_OPTIONS=detect_leaks=0
1111
require 'testdb.inc';
1212

1313
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
14-
@$dbh->exec('drop table test_aaa');
1514
$dbh->exec('create table test_aaa (id integer)');
1615
$S = $dbh->prepare('insert into test_aaa (id) values (:id) returning id');
1716
$S->execute(['id' => 1]);
@@ -23,7 +22,7 @@ echo 'OK';
2322
--CLEAN--
2423
<?php
2524
require 'testdb.inc';
26-
$dbh->exec("DROP TABLE test_aaa");
25+
@$dbh->exec("DROP TABLE test_aaa");
2726
?>
2827
--EXPECT--
2928
OK

ext/pdo_firebird/tests/ddl.phpt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ $dbh->commit();
3131

3232
unset($dbh);
3333
echo "done\n";
34-
35-
?>
34+
-?>
3635
--CLEAN--
3736
<?php
3837
require 'testdb.inc';
39-
$dbh->exec('DROP TABLE test_ddl');
40-
$dbh->exec('DROP GENERATOR gen_ddl_id');
41-
$dbh->exec('DROP TRIGGER ddl_bi');
38+
@$dbh->exec('DROP TABLE test_ddl');
39+
@$dbh->exec('DROP GENERATOR gen_ddl_id');
40+
@$dbh->exec('DROP TRIGGER ddl_bi');
4241
?>
4342
--EXPECT--
4443
int(1)

ext/pdo_firebird/tests/dialect_1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ echo "done\n";
5555
--CLEAN--
5656
<?php
5757
require 'testdb.inc';
58-
$dbh->exec('DROP TABLE test_dialect_1');
58+
@$dbh->exec('DROP TABLE test_dialect_1');
5959
--EXPECT--
6060
int(1)
6161
string(8) "2.000000"

ext/pdo_firebird/tests/execute.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ echo "done\n";
4646
--CLEAN--
4747
<?php
4848
require 'testdb.inc';
49-
$dbh->exec('DROP TABLE test_execute');
49+
@$dbh->exec('DROP TABLE test_execute');
5050
--EXPECT--
5151
bool(true)
5252
int(1)

ext/pdo_firebird/tests/gh10908.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ echo "Did not crash\n";
5656
--CLEAN--
5757
<?php
5858
require 'testdb.inc';
59-
$dbh->exec("DROP TABLE gh10908");
59+
@$dbh->exec("DROP TABLE gh10908");
6060
?>
6161
--EXPECT--
6262
Array

ext/pdo_firebird/tests/gh8576.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ array(1) {
2626
--CLEAN--
2727
<?php
2828
require 'testdb.inc';
29-
$dbh->exec("DROP TABLE gh8576");
29+
@$dbh->exec("DROP TABLE gh8576");
3030
?>

ext/pdo_firebird/tests/rowCount.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ unset($dbh);
4444
--CLEAN--
4545
<?php
4646
require 'testdb.inc';
47-
$dbh->exec('DROP TABLE test_rowcount');
47+
@$dbh->exec('DROP TABLE test_rowcount');
4848
--EXPECT--
4949
bool(false)
5050
int(2)

ext/pdo_oci/tests/pdo_oci_attr_autocommit_2.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ $dbh = PDOTest::factory();
1616

1717
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
1818

19-
$dbh->exec("create table pdo_ac_tab (col1 varchar2(25))");
19+
$dbh->exec("create table test_pdo_oci_attr_autocommit_2 (col1 varchar2(25))");
2020

2121
echo "Test 1 Check beginTransaction insertion\n";
2222

2323
$dbh->beginTransaction();
2424
try {
25-
$dbh->exec("insert into pdo_ac_tab (col1) values ('data 1')");
26-
$dbh->exec("insert into pdo_ac_tab (col1) values ('data 2')");
25+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('data 1')");
26+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('data 2')");
2727
$dbh->commit();
2828
}
2929
catch (PDOException $e) {
@@ -36,8 +36,8 @@ echo "Test 2 Cause an exception and test beginTransaction rollback\n";
3636

3737
$dbh->beginTransaction();
3838
try {
39-
$dbh->exec("insert into pdo_ac_tab (col1) values ('not committed #1')");
40-
$dbh->exec("insert into pdo_ac_tab (col1) values ('data that is too long to fit and will barf')");
39+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('not committed #1')");
40+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('data that is too long to fit and will barf')");
4141
$dbh->commit();
4242
}
4343
catch (PDOException $e) {
@@ -48,7 +48,7 @@ catch (PDOException $e) {
4848

4949
echo "Test 3 Setting ATTR_AUTOCOMMIT to true will commit and end the transaction\n";
5050

51-
$dbh->exec("insert into pdo_ac_tab (col1) values ('data 3')");
51+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('data 3')");
5252
$dbh->setAttribute(PDO::ATTR_AUTOCOMMIT, true);
5353
print "PDO::ATTR_AUTOCOMMIT: ";
5454
var_dump($dbh->getAttribute(PDO::ATTR_AUTOCOMMIT));
@@ -63,7 +63,7 @@ catch (PDOException $e) {
6363
echo "Test 4 Setting ATTR_AUTOCOMMIT to false will commit and end the transaction\n";
6464

6565
$dbh->beginTransaction();
66-
$dbh->exec("insert into pdo_ac_tab (col1) values ('data 4')");
66+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('data 4')");
6767
$dbh->setAttribute(PDO::ATTR_AUTOCOMMIT, false);
6868
print "PDO::ATTR_AUTOCOMMIT: ";
6969
var_dump($dbh->getAttribute(PDO::ATTR_AUTOCOMMIT));
@@ -80,10 +80,10 @@ echo "Test 5 Handle transactions ourselves\n";
8080
print "PDO::ATTR_AUTOCOMMIT: ";
8181
var_dump($dbh->getAttribute(PDO::ATTR_AUTOCOMMIT));
8282

83-
$dbh->exec("insert into pdo_ac_tab (col1) values ('not committed #2')");
83+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('not committed #2')");
8484
$dbh->exec("rollback");
85-
$dbh->exec("insert into pdo_ac_tab (col1) values ('data 5')");
86-
$dbh->exec("insert into pdo_ac_tab (col1) values ('data 6')");
85+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('data 5')");
86+
$dbh->exec("insert into test_pdo_oci_attr_autocommit_2 (col1) values ('data 6')");
8787

8888
$dbh->exec("commit");
8989

@@ -92,7 +92,7 @@ $dbh->exec("commit");
9292
$dbh2 = PDOTest::factory();
9393

9494
echo "Query Results are:\n";
95-
$s = $dbh2->prepare("select col1 from pdo_ac_tab");
95+
$s = $dbh2->prepare("select col1 from test_pdo_oci_attr_autocommit_2");
9696
$s->execute();
9797
while ($r = $s->fetch()) {
9898
echo $r[0] . "\n";
@@ -105,7 +105,7 @@ echo "Done\n";
105105
<?php
106106
require 'ext/pdo/tests/pdo_test.inc';
107107
$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
108-
PDOTest::dropTableIfExists($db, test_pdo_oci_attr_autocommit_2");
108+
PDOTest::dropTableIfExists($db, "test_pdo_oci_attr_autocommit_2");
109109
?>
110110
--EXPECTF--
111111
Test 1 Check beginTransaction insertion

ext/pdo_pgsql/tests/bug62498-32bit.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Done
4949
<?php
5050
require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
5151
$db = PDOTest::test_factory(__DIR__ . '/common.phpt');
52-
$db->exec("DROP TABLE IF EXIST test62498_32");
52+
$db->exec("DROP TABLE IF EXISTS test62498_32");
5353
?>
5454
--EXPECTF--
5555
Begin test...

0 commit comments

Comments
 (0)