Installation
Requirements
- PHP 8.4 or higher
Composer
Install DocTest as a development dependency:
bash
composer require --dev testflowlabs/doctestAfter installation, the doctest binary is available at:
bash
vendor/bin/doctestVerify Installation
Run without arguments to test the default paths (docs/ and README.md):
bash
vendor/bin/doctestIf no markdown files contain PHP code blocks, DocTest will exit cleanly with no output.
Framework Bootstrap
If your documentation examples need a framework (Laravel, Symfony, etc.), configure a bootstrap file. See Framework Bootstrap for details.
Configuration
Create an optional doctest.php in your project root to customize paths, timeouts, and reporters:
bash
touch doctest.phpSee Configuration for the full reference.