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