Skip to content

Commit 8a20154

Browse files
authored
Fix dba tests wrt resource to object conversion (GH-15716)
We should not pretend that there are still user-visible resources, since we're dealing with objects now.
1 parent 3892529 commit 8a20154

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

ext/dba/tests/dba015.phpt

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ echo dba_fetch("key1", $db_file1), "\n";
2626
echo "Test 2\n";
2727
$db_file2 = dba_popen($db_filename, 'n', 'flatfile');
2828
if ($db_file1 === $db_file2) {
29-
echo "resources are the same\n";
29+
echo "objects are the same\n";
3030
} else {
31-
echo "resources are different\n";
31+
echo "objects are different\n";
3232
}
3333

3434

35-
echo "Test 3 - fetch both rows from second resource\n";
35+
echo "Test 3 - fetch both rows from second object\n";
3636
dba_insert("key2", "This is a test insert 2", $db_file2);
3737
echo dba_fetch("key1", $db_file2), "\n";
3838
echo dba_fetch("key2", $db_file2), "\n";
3939

4040

41-
echo "Test 4 - fetch both rows from first resource\n";
41+
echo "Test 4 - fetch both rows from first object\n";
4242
echo dba_fetch("key1", $db_file1), "\n";
4343
echo dba_fetch("key2", $db_file1), "\n";
4444

45-
echo "Test 5 - close 2nd resource\n";
45+
echo "Test 5 - close 2nd object\n";
4646
dba_close($db_file2);
4747
var_dump($db_file1);
4848
try {
@@ -51,7 +51,7 @@ try {
5151
echo $e->getMessage() . "\n";
5252
}
5353

54-
echo "Test 6 - query after closing 2nd resource\n";
54+
echo "Test 6 - query after closing 2nd object\n";
5555
echo dba_fetch("key1", $db_file1), "\n";
5656
echo dba_fetch("key2", $db_file1), "\n";
5757

@@ -65,17 +65,17 @@ database handler: flatfile
6565
Test 1
6666
This is a test insert 1
6767
Test 2
68-
resources are different
69-
Test 3 - fetch both rows from second resource
68+
objects are different
69+
Test 3 - fetch both rows from second object
7070
This is a test insert 1
7171
This is a test insert 2
72-
Test 4 - fetch both rows from first resource
72+
Test 4 - fetch both rows from first object
7373
This is a test insert 1
7474
This is a test insert 2
75-
Test 5 - close 2nd resource
75+
Test 5 - close 2nd object
7676
object(Dba\Connection)#%d (%d) {
7777
}
7878
DBA connection has already been closed
79-
Test 6 - query after closing 2nd resource
79+
Test 6 - query after closing 2nd object
8080
This is a test insert 1
8181
This is a test insert 2

ext/dba/tests/dba_db4_018.phpt

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ echo dba_fetch("key1", $db_file1), "\n";
2626
echo "Test 2\n";
2727
$db_file2 = dba_popen($db_filename, 'n', 'flatfile');
2828
if ($db_file1 === $db_file2) {
29-
echo "resources are the same\n";
29+
echo "objects are the same\n";
3030
} else {
31-
echo "resources are different\n";
31+
echo "object are different\n";
3232
}
3333

3434

35-
echo "Test 3 - fetch both rows from second resource\n";
35+
echo "Test 3 - fetch both rows from second object\n";
3636
dba_insert("key2", "This is a test insert 2", $db_file2);
3737
echo dba_fetch("key1", $db_file2), "\n";
3838
echo dba_fetch("key2", $db_file2), "\n";
3939

4040

41-
echo "Test 4 - fetch both rows from first resource\n";
41+
echo "Test 4 - fetch both rows from first object\n";
4242
echo dba_fetch("key1", $db_file1), "\n";
4343
echo dba_fetch("key2", $db_file1), "\n";
4444

45-
echo "Test 5 - close 2nd resource\n";
45+
echo "Test 5 - close 2nd object\n";
4646
dba_close($db_file2);
4747
var_dump($db_file1);
4848
try {
@@ -51,7 +51,7 @@ try {
5151
echo $e->getMessage() . "\n";
5252
}
5353

54-
echo "Test 6 - query after closing 2nd resource\n";
54+
echo "Test 6 - query after closing 2nd object\n";
5555
echo dba_fetch("key1", $db_file1), "\n";
5656
echo dba_fetch("key2", $db_file1), "\n";
5757

@@ -65,17 +65,17 @@ database handler: db4
6565
Test 1
6666
This is a test insert 1
6767
Test 2
68-
resources are different
69-
Test 3 - fetch both rows from second resource
68+
objects are different
69+
Test 3 - fetch both rows from second object
7070
This is a test insert 1
7171
This is a test insert 2
72-
Test 4 - fetch both rows from first resource
72+
Test 4 - fetch both rows from first object
7373
This is a test insert 1
7474
This is a test insert 2
75-
Test 5 - close 2nd resource
75+
Test 5 - close 2nd object
7676
object(Dba\Connection)#%d (%d) {
7777
}
7878
DBA connection has already been closed
79-
Test 6 - query after closing 2nd resource
79+
Test 6 - query after closing 2nd object
8080
This is a test insert 1
8181
This is a test insert 2

0 commit comments

Comments
 (0)