php / pecl-database-pdo_oci

PDO extension to interact with Oracle databases
Other
1 stars 5 forks source link

How to run unit tests? #3

Open rainerjung opened 2 months ago

rainerjung commented 2 months ago

Hi there, I try to integrate this pecl module into a PHP 8.4 build. I can build the module separately using phpize, configure and make. The problem is "make test". The test classes partially require absolute "DIR.'/../../pdo/tests/pdo_test.inc'" paths (workaround possible with a symlink), partially relative paths "ext/pdo/tests/pdo_test.inc" (workaround set include_path), but also refer to "ext/pdo/tests" in common.phpt. Any hints on how to run the unit tests, not that the module is unbundled from PHP 8.4? The oci8 module does not have this problem, because it doesn't rely on other test files from the PHP bundle. Best regards, Rainer

cmb69 commented 2 months ago

A straightforward solution might be to copy https://github.com/php/php-src/blob/master/ext/pdo/tests/pdo_test.inc over to the pdo_oci test suite (and that file could be trimmed down to the required parts; as well pdo_test.inc in php-src no longer needs to cater to oci).

/cc @cjbj

cjbj commented 2 months ago

Or perhaps copy the pdo_oci dir back under the PHP ext/ directory.

cjbj commented 2 months ago

@rainerjung do you have any comments on https://github.com/php/pecl-database-pdo_oci/pull/7 ?