-
Notifications
You must be signed in to change notification settings - Fork 41
PHPUnit
Mark Metcalfe edited this page Oct 30, 2021
·
16 revisions
Running PHPUnit from the command line is relatively simple.
Log into one of the PHP containers:
# must run the command from the root of your Totara repo
cd sitefolder
tzsh php
Initiate the PHPUnit setup:
# See shell/default-aliases.sh for what this alias does
installunit
Run tests:
# See shell/default-aliases.sh for what this alias does
unit # Run all tests
unit relative/path/to/test.php # Run a single test file
unit server/totara/core # Run all tests in a directory
unit --group perform # Run tests tagged with a group
See this page for instructions on how to run PHPUnit directly within PHPStorm.
Copyright (c) 2025 Totara Learning Solutions Limited