[PECL-CVS] [pecl-database-oci8] main: Correct errors in tests and add a README.md file for the tests
[email protected] (Sharad Chandran R)
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Sharad Chandran R (sharadraju)
Date: 2025-12-24T14:57:23+05:30
Commit: https://github.com/php/pecl-database-oci8/commit/8f19ee9ebd64f84accdbfaf6df486c28c080d0ee
Raw diff: https://github.com/php/pecl-database-oci8/commit/8f19ee9ebd64f84accdbfaf6df486c28c080d0ee.diff
Correct errors in tests and add a README.md file for the tests
Changed paths:
A tests/README.md
M tests/lob_prefetch.phpt
M tests/lob_prefetch_ini.phpt
Diff:
diff --git a/tests/README.md b/tests/README.md
new file mode 100644
index 0000000..b1821d1
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,22 @@
+# Test Configuration Requirements
+
+Check the [details.inc](details.inc) file for the configuration details.
+
+Set the following environment variables to provide credentials for the PHP tests:
+
+`PHP_OCI8_TEST_USER` - the username of the database schema user to be used for testing.
+
+`PHP_OCI8_TEST_PASS` - the password of the database schema user to be used for testing.
+
+`PHP_OCI8_TEST_DB` - the connection string that points to your database's location.
+
+`PHP_OCI8_TEST_DRCP` - for running DRCP tests. It should be set to ``true``
+to run DRCP tests. Otherwise, DRCP-specific tests are skipped.
+
+# Running the tests
+
+To run the tests, execute:
+```
+php <testname>
+
+```
\ No newline at end of file
diff --git a/tests/lob_prefetch.phpt b/tests/lob_prefetch.phpt
index d6d3711..be0f0b6 100755
--- a/tests/lob_prefetch.phpt
+++ b/tests/lob_prefetch.phpt
@@ -58,7 +58,7 @@ function get_clob_loc($c, $sql, $pfl) {
while (($row = oci_fetch_array($stid, OCI_ASSOC)) != false) {
$l[] = $row['CLOB']->load();
$row['CLOB']->free();
- if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure" . strlen($l)); exit; }
+ if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure. clob length = " . strlen($l[0])); exit; }
}
return($l);
}
@@ -71,7 +71,7 @@ function get_clob_inline($c, $sql, $pfl) {
$l = [];
while (($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_LOBS)) != false) {
$l[] = $row['CLOB'];
- if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure" . strlen($l)); exit; }
+ if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure. clob length = " . strlen($l[0])); exit; }
}
return($l);
}
@@ -99,7 +99,7 @@ function get_blob_loc($c, $sql, $pfl) {
while (($row = oci_fetch_array($stid, OCI_ASSOC)) != false) {
$l[] = $row['BLOB']->load();
$row['BLOB']->free();
- if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure" . strlen($l)); exit; }
+ if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure. blob length = " . strlen($l[0])); exit; }
}
return($l);
}
diff --git a/tests/lob_prefetch_ini.phpt b/tests/lob_prefetch_ini.phpt
index 2c11264..2ccbb14 100755
--- a/tests/lob_prefetch_ini.phpt
+++ b/tests/lob_prefetch_ini.phpt
@@ -59,7 +59,7 @@ function get_clob_loc($c, $sql, $pfl) {
while (($row = oci_fetch_array($stid, OCI_ASSOC)) != false) {
$l[] = $row['CLOB']->load();
$row['CLOB']->free();
- if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure" . strlen($l)); exit; }
+ if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure. clob length = " . strlen($l[0])); exit; }
}
return($l);
}
@@ -72,7 +72,7 @@ function get_clob_inline($c, $sql, $pfl) {
$l = [];
while (($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_LOBS)) != false) {
$l[] = $row['CLOB'];
- if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure" . strlen($l)); exit; }
+ if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure. clob length = " . strlen($l[0])); exit; }
}
return($l);
}
@@ -100,7 +100,7 @@ function get_blob_loc($c, $sql, $pfl) {
while (($row = oci_fetch_array($stid, OCI_ASSOC)) != false) {
$l[] = $row['BLOB']->load();
$row['BLOB']->free();
- if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure" . strlen($l)); exit; }
+ if (strlen($l[0]) != LOBSIZE) { print("strlen(l) failure. blob length = " . strlen($l[0])); exit; }
}
return($l);
}