Ref: https://docs.moodle.org/dev/PHPUnit

composer install --dev

php admin/tool/phpunit/cli/init.php

Linux/Unix/MacOS
or
Windows\

vendor/bin/phpunit course/format/topcoll/tests/courseformatlib_test.php
or
vendor\bin\phpunit course/format/topcoll/tests/courseformatlib_test.php

vendor/bin/phpunit course/format/topcoll/tests/courseformatrenderer_test.php
or
vendor\bin\phpunit course/format/topcoll/tests/courseformatrenderer_test.php

vendor/bin/phpunit course/format/topcoll/tests/courseformattoolbox_test.php
or
vendor\bin\phpunit course/format/topcoll/tests/courseformattoolbox_test.php

vendor/bin/phpunit course/format/topcoll/tests/privacy_provider_test.php
or
vendor\bin\phpunit course/format/topcoll/tests/privacy_provider_test.php

vendor/bin/phpunit course/format/topcoll/tests/togglelib_test.php
or
vendor\bin\phpunit course/format/topcoll/tests/togglelib_test.php

vendor/bin/phpunit --group format_topcoll
or
vendor\bin\phpunit --group format_topcoll
