project:unittests
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
project:unittests [2025/08/03 03:36] – [PHPUnit] mnewnham | project:unittests [2025/09/25 05:12] (current) – [ADOdb Section] mnewnham | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Prerequistes ===== | ===== Prerequistes ===== | ||
- | [[https:// | + | * PHP 8.0 or higher |
+ | * [[https:// | ||
===== Setup ===== | ===== Setup ===== | ||
Configuration information for the tests is held in a configuration file // | Configuration information for the tests is held in a configuration file // | ||
- | ===== Settup | + | ===== Setting |
==== ADOdb Section ==== | ==== ADOdb Section ==== | ||
- | If the ADOdb section | + | Add the ADOdb section and set the item directory |
+ | |||
+ | Setting the casing activates the ADODB_CASE value | ||
< | < | ||
[ADOdb] | [ADOdb] | ||
directory=/ | directory=/ | ||
- | </ | + | casing=1 |
- | + | ||
- | If the section is not defined, it assumes that the ADOdb installation is the parent directory of the unit test | + | |
- | + | ||
- | < | + | |
- | / | + | |
- | / | + | |
</ | </ | ||
Line 34: | Line 31: | ||
==== XMLschema Section ==== | ==== XMLschema Section ==== | ||
- | This section must be explicitly enabled in the configuration file, with the skipXmlTests value set to 0 , otherwise all tests in the section are skipped. Setting the value to 1 will also skip the tests | + | This section must be explicitly enabled in the configuration file, with the skipXmlTests value set to 0, otherwise all tests in the section are skipped. Setting the value to 1 will also skip the tests. |
+ | Setting debug=1 in this section activates the extended debugging feature available in this module. | ||
< | < | ||
[xmlschema] | [xmlschema] | ||
skipXmlTests=0 | skipXmlTests=0 | ||
+ | debug=0 | ||
</ | </ | ||
==== Driver Section ==== | ==== Driver Section ==== | ||
Line 73: | Line 72: | ||
==== Caching Section ==== | ==== Caching Section ==== | ||
- | Unless explicitly enabled, cache functions such as // | + | Unless explicitly enabled, cache functions such as // |
+ | === Filesystem === | ||
< | < | ||
[caching] | [caching] | ||
cacheMethod=1 | cacheMethod=1 | ||
cacheDir=c:/ | cacheDir=c:/ | ||
+ | </ | ||
+ | |||
+ | === Memcache Based === | ||
+ | < | ||
+ | [cache] | ||
+ | cacheMethod=2 | ||
+ | cacheHost=192.168.1.50 | ||
</ | </ | ||
Line 108: | Line 114: | ||
It is not possible to pass the driver name as a run-time argument in this version. The driver to test must have the **active** flag defined in the driver section. | It is not possible to pass the driver name as a run-time argument in this version. The driver to test must have the **active** flag defined in the driver section. | ||
+ | ===== Writing or Updating Tests ===== | ||
- | + | * Tests should be compliant with PHPunit version 9 and higher | |
+ | * Tests should be compatible with all platforms supported by PHPunit | ||
+ | * Tests should be written to [[https:// | ||
+ | * Wherever possible, write database agnostic tests. Only write driver specific tests when a feature is only supported by one or two DBMS | ||
+ | * Only add driver specific tests to the test file specifically labeled for that driver, e.g. // | ||
+ | * Do not add driver-based code branches inside the generic test code | ||
project/unittests.1754184985.txt.gz · Last modified: by mnewnham