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/07/29 03:35] – [ADOdb Section] mnewnham | project:unittests [2025/08/01 00:37] (current) – mnewnham | ||
---|---|---|---|
Line 14: | Line 14: | ||
</ | </ | ||
- | ====== | + | If the section is not defined, it assumes that the ADOdb installation is the parent directory of the unit test |
+ | |||
+ | < | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ==== Blob Section | ||
+ | This section must be defined, either with the path name to a binary file, such as a jpeg file that can be used for read-write testing. If set to false, all blob tests are skipped. | ||
+ | |||
+ | < | ||
+ | [blob] | ||
+ | testBlob=c:/ | ||
+ | </ | ||
+ | |||
+ | ==== Driver Section | ||
The driver configuration is based on the driver name. | The driver configuration is based on the driver name. | ||
Line 37: | Line 52: | ||
|parameters|To set parameters normally set by '' | |parameters|To set parameters normally set by '' | ||
|active|If a run-time parameter of the driver is not passed of the PHPunit version > 9, then the test is run against the first driver where the active flag is set to true| | |active|If a run-time parameter of the driver is not passed of the PHPunit version > 9, then the test is run against the first driver where the active flag is set to true| | ||
- | ===== Test Execution ===== | ||
- | ==== PHPUnit 9 or lower ==== | ||
- | < | ||
- | phpunit unittest --bootstrap unittest/ | ||
- | </ | ||
- | Where the < | + | ==== Meta Section ==== |
+ | Unless explicitly enabled, | ||
- | ==== PHPUnit 10 or higher ==== | + | < |
- | < | + | skipDbCreation=0 |
- | phpunit unittest --bootstrap unittest/ | + | |
</ | </ | ||
- | The driver to test must have the **active** flag defined in the driver section | ||
- | ===== Testing Cache Functions ===== | + | ==== Caching Section |
Unless explicitly enabled, cache functions such as // | Unless explicitly enabled, cache functions such as // | ||
Line 63: | Line 72: | ||
To disable cache tests while leaving the section in place, '' | To disable cache tests while leaving the section in place, '' | ||
- | ===== Miscellaneous ===== | + | ==== Globals Section |
To test some date functions, the local timezone must be equal to the server timezone. To change the timezone temporarily for the test, set the following gloval parameter in adodb-unittest.ini. This should exactly match the format in php.ini. | To test some date functions, the local timezone must be equal to the server timezone. To change the timezone temporarily for the test, set the following gloval parameter in adodb-unittest.ini. This should exactly match the format in php.ini. | ||
Line 72: | Line 81: | ||
Any parameter saved into the **[globals]** section will be set using ini_set() | Any parameter saved into the **[globals]** section will be set using ini_set() | ||
+ | |||
+ | ===== Test Execution ===== | ||
+ | ==== PHPUnit 9 or lower ==== | ||
+ | < | ||
+ | phpunit unittest --bootstrap unittest/ | ||
+ | </ | ||
+ | |||
+ | Where the < | ||
+ | |||
+ | ==== PHPUnit 10 or higher ==== | ||
+ | < | ||
+ | phpunit unittest --bootstrap unittest/ | ||
+ | </ | ||
+ | |||
+ | The driver to test must have the **active** flag defined in the driver section | ||
+ | |||
+ | |||
project/unittests.1753752938.txt.gz · Last modified: by mnewnham