Browse Source

Tests will be skipped if a tester does not explicitly specify the

test-database setup in dbx_test.p.
migration/unlabaled-1.29.2
Marc Boeren 24 years ago
parent
commit
cee4219e49
  1. 10
      ext/dbx/tests/003.phpt
  2. 10
      ext/dbx/tests/004.phpt
  3. 10
      ext/dbx/tests/005.phpt
  4. 10
      ext/dbx/tests/006.phpt
  5. 10
      ext/dbx/tests/007.phpt
  6. 10
      ext/dbx/tests/008.phpt
  7. 5
      ext/dbx/tests/dbx_test.p

10
ext/dbx/tests/003.phpt

@ -1,12 +1,18 @@
--TEST--
dbx_connect
--SKIPIF--
<?php if (!extension_loaded("dbx")) print("skip"); ?>
<?php
if (!extension_loaded("dbx")) print("skip");
else {
include_once("dbx_test.p");
if ($connection===NULL) print("skip");
}
?>
--POST--
--GET--
--FILE--
<?php
include_once("ext/dbx/tests/dbx_test.p");
include_once("dbx_test.p");
$nonexisting_database="nonexisting_database";
$nonexisting_username="nonexisting_username";
$nonexisting_password="nonexisting_password";

10
ext/dbx/tests/004.phpt

@ -1,12 +1,18 @@
--TEST--
dbx_close
--SKIPIF--
<?php if (!extension_loaded("dbx")) print("skip"); ?>
<?php
if (!extension_loaded("dbx")) print("skip");
else {
include_once("dbx_test.p");
if ($connection===NULL) print("skip");
}
?>
--POST--
--GET--
--FILE--
<?php
include_once("ext/dbx/tests/dbx_test.p");
include_once("dbx_test.p");
$dlo = dbx_connect($module, $host, $database, $username, $password);
if ($dlo!=0) {
if (dbx_close($dlo)) {

10
ext/dbx/tests/005.phpt

@ -1,12 +1,18 @@
--TEST--
dbx_query
--SKIPIF--
<?php if (!extension_loaded("dbx")) print("skip"); ?>
<?php
if (!extension_loaded("dbx")) print("skip");
else {
include_once("dbx_test.p");
if ($connection===NULL) print("skip");
}
?>
--POST--
--GET--
--FILE--
<?php
include_once("ext/dbx/tests/dbx_test.p");
include_once("dbx_test.p");
$sql_statement = "select * from tbl order by id";
$invalid_sql_statement = "invalid select * from tbl";
$sql_select_statement = "select * from tbl where id=999999 and parentid=999999";

10
ext/dbx/tests/006.phpt

@ -1,12 +1,18 @@
--TEST--
dbx_error
--SKIPIF--
<?php if (!extension_loaded("dbx")) print("skip"); ?>
<?php
if (!extension_loaded("dbx")) print("skip");
else {
include_once("dbx_test.p");
if ($connection===NULL) print("skip");
}
?>
--POST--
--GET--
--FILE--
<?php
include_once("ext/dbx/tests/dbx_test.p");
include_once("dbx_test.p");
if ($module==DBX_ODBC) {
// ODBC module doesn't have an error-message-function (yet?)
print('query generated an error: dbx_error works ok'."\n");

10
ext/dbx/tests/007.phpt

@ -1,12 +1,18 @@
--TEST--
dbx_sort
--SKIPIF--
<?php if (!extension_loaded("dbx")) print("skip"); ?>
<?php
if (!extension_loaded("dbx")) print("skip");
else {
include_once("dbx_test.p");
if ($connection===NULL) print("skip");
}
?>
--POST--
--GET--
--FILE--
<?php
include_once("ext/dbx/tests/dbx_test.p");
include_once("dbx_test.p");
$sql_statement = "select id, description from tbl where parentid=1 order by id";
$compare_function = "cmp";
$invalid_compare_function = "invalid_cmp";

10
ext/dbx/tests/008.phpt

@ -1,12 +1,18 @@
--TEST--
dbx_compare
--SKIPIF--
<?php if (!extension_loaded("dbx")) print("skip"); ?>
<?php
if (!extension_loaded("dbx")) print("skip");
else {
include_once("dbx_test.p");
if ($connection===NULL) print("skip");
}
?>
--POST--
--GET--
--FILE--
<?php
include_once("ext/dbx/tests/dbx_test.p");
include_once("dbx_test.p");
$sql_statement = "select id, description from tbl where parentid=1 order by id";
$compare_function_1 = "cmp_description_id";
$compare_function_2 = "cmp_description_desc_id";

5
ext/dbx/tests/dbx_test.p

@ -1,5 +1,8 @@
<?php
$connection = DBX_SYBASECT;
// set the $connection to match your test-database setup
// (possibly change the rest of the settings too)
// e.g. $connection = DBX_MYSQL;
$connection = NULL;
switch ($connection) {
case DBX_MYSQL:
$module=DBX_MYSQL;

Loading…
Cancel
Save