-
Notifications
You must be signed in to change notification settings - Fork 40
PHPUnit
Mark Metcalfe edited this page Oct 3, 2021
·
17 revisions
Running PHPUnit from the command line is relatively simple.
Log into one of the PHP containers:
cd sitefolder # must run the command from the root of your Totara repo
tzsh php-7.3 # or other php containers, as mentioned aboveInitiate the PHPUnit setup:
installunitRun tests:
# Run all tests
unit
# Run a single test file
unit relative/path/to/test.php
# Run all tests in a directory
unitdir totara/coreSee this page for instructions on how to run PHPUnit directly within PHPStorm.
Copyright (c) 2025 Totara Learning Solutions Limited