Name Date Size #Lines LOC

..--

conf/H08-Apr-2026-7554

core/H08-Apr-2026-6,4714,053

data/H08-Apr-2026-607393

mock/H08-Apr-2026-8046

rector/H08-Apr-2026-10577

tests/H08-Apr-2026-46,53640,513

READMEH A D11-Apr-20262.2 KiB8144

bootstrap.phpH A D08-Apr-20263.7 KiB12485

composer.jsonH A D08-Apr-2026665 3029

composer.lockH A D11-Apr-202675.6 KiB2,1442,143

mysql.conf.php.distH A D08-Apr-2026228 109

pgsql.conf.php.distH A D08-Apr-2026243 109

phpcs.xmlH A D08-Apr-20263.9 KiB9064

phpcs_MigrationAdjustments.xmlH A D08-Apr-20261.4 KiB3024

phpunit.xmlH A D08-Apr-20261.5 KiB4039

proxy.conf.php.distH A D08-Apr-2026143 76

rector.phpH A D12-Apr-202611.6 KiB227194

README

1====== DokuWiki Test Suite and Develpoment Tools ======
2
3This directory contains the test suite for DokuWiki as well as configuration for various code quality tools.
4
5===== Setup =====
6
7Before you can use any of the tools you need to install the dependencies. This is done using composer.
8
9  composer install
10
11If you don't have composer installed yet, you can get it from https://getcomposer.org/
12
13===== Composer Scripts =====
14
15The composer configuration contains a number of scripts to run the various tools on all of DokuWiki.
16
17Run all the tests:
18
19  composer run test
20
21Check for code style violations:
22
23  composer run check
24
25Automatically fix code style violations:
26
27  composer run autofix
28
29===== Tools =====
30
31All the tools can be called directly from the ''vendor/bin'' directory.
32
33==== PHPUnit ====
34
35  ./vendor/bin/phpunit --verbose --stderr
36
37The --stderr flag is needed to avoid a headers already sent error on some systems.
38
39To learn more about running tests and writing your own, visit https://www.dokuwiki.org/devel:unittesting
40
41==== PHP CodeSniffer ====
42
43To check for code violations:
44
45  ./vendor/bin/phpcs
46
47To automatically fix code violations:
48
49  ./vendor/bin/phpcbf
50
51To learn more about PHP CodeSniffer visit https://www.dokuwiki.org/devel:phpcodesniffer
52
53==== Rector ====
54
55To automatically fix code smells
56
57  ./vendor/bin/rector process
58
59To learn more about PHP CodeSniffer visit https://www.dokuwiki.org/devel:rector
60
61
62===== 32-bit =====
63
64PHP 9 may drop 32bit support. Security updates for 8.4 end on 2028-12-31. See https://wiki.php.net/rfc/drop_32bit_support and https://www.php.net/supported-versions.php
65
66In the meantime, 32-bit containers (''--platform linux/386'') can provide testing for 64bit hosts. NB. The more approprate ''php:8.3.26RC1-zts-alpine3.21'' does not have `bcmath` need by `bitmask64On32` (../inc/Ip32.php); `wpstaging/php:8.3-32bit` is one container that does include the library.
67
68After local ''composer install''
69
70  podman run -v $PWD/..:/dokuwiki \
71    \--platform linux/386 --workdir /dokuwiki/_test  \
72    docker://wpstaging/php:8.3-32bit \
73    ./vendor/bin/phpunit --verbose --stderr \
74    # --filter test_ip
75
76<!-- emacs file-local settings
77Local Variables:
78mode: dokuwiki
79End:
80-->
81