@@ -68,13 +68,15 @@ to see more about `docker-compose` environment variables.
6868
6969## Use containers for running behat tests
7070
71+ > Note: If using tool with versions of Moodle 5.0 and earlier, ` public/ ` command prefix is not required.
72+
7173``` bash
7274# Initialize behat environment
73- bin/moodle-docker-compose exec webserver php admin/tool/behat/cli/init.php
75+ bin/moodle-docker-compose exec webserver php public/ admin/tool/behat/cli/init.php
7476# [..]
7577
7678# Run behat tests
77- bin/moodle-docker-compose exec -u www-data webserver php admin/tool/behat/cli/run.php --tags=@auth_manual
79+ bin/moodle-docker-compose exec -u www-data webserver php public/ admin/tool/behat/cli/run.php --tags=@auth_manual
7880Running single behat site:
7981Moodle 3.4dev (Build: 20171006), 33a3ec7c9378e64c6f15c688a3c68a39114aa29d
8082Php: 7.1.9, pgsql: 9.6.5, OS: Linux 4.9.49-moby x86_64
@@ -95,9 +97,11 @@ Notes:
9597
9698## Use containers for running phpunit tests
9799
100+ > Note: If using tool with versions of Moodle 5.0 and earlier, ` public/ ` command prefix is not required.
101+
98102``` bash
99103# Initialize phpunit environment
100- bin/moodle-docker-compose exec webserver php admin/tool/phpunit/cli/init.php
104+ bin/moodle-docker-compose exec webserver php public/ admin/tool/phpunit/cli/init.php
101105# [..]
102106
103107# Run phpunit tests
@@ -118,7 +122,7 @@ Notes:
118122* If you want to run tests with code coverage reports:
119123```
120124# Build component configuration
121- bin/moodle-docker-compose exec webserver php admin/tool/phpunit/cli/util.php --buildcomponentconfigs
125+ bin/moodle-docker-compose exec webserver php public/ admin/tool/phpunit/cli/util.php --buildcomponentconfigs
122126# Execute tests for component
123127bin/moodle-docker-compose exec webserver php -d pcov.enabled=1 -d pcov.directory=. vendor/bin/phpunit --configuration reportbuilder --coverage-text
124128```
@@ -128,11 +132,11 @@ bin/moodle-docker-compose exec webserver php -d pcov.enabled=1 -d pcov.directory
128132
129133``` bash
130134# Initialize Moodle database for manual testing
131- bin/moodle-docker-compose
exec webserver php admin/cli/install_database.php --agree-license --fullname=
" Docker moodle" --shortname=
" docker_moodle" --summary=
" Docker moodle site" --adminpass=
" test" --adminemail=
" [email protected] " 135+ bin/moodle-docker-compose
exec webserver php
public/ admin/cli/install_database.php --agree-license --fullname=
" Docker moodle" --shortname=
" docker_moodle" --summary=
" Docker moodle site" --adminpass=
" test" --adminemail=
" [email protected] " 132136```
133137
134138Notes:
135- * Moodle is configured to listen on ` http://localhost:8000/ ` .
139+ * Moodle is configured to listen on ` http://localhost:8000/public ` .
136140* Mailpit is listening on ` http://localhost:8000/_/mail ` to view emails which Moodle has sent out.
137141* The admin ` username ` you need to use for logging in is ` admin ` by default. You can customize it by passing ` --adminuser='myusername' `
138142* During manual testing, if you are facing that your Moodle site is logging
@@ -157,11 +161,11 @@ For both options, you also need to set `MOODLE_DOCKER_BROWSER` to "chrome".
157161git clone https://github.com/moodlehq/moodle-local_moodleappbehat " $MOODLE_DOCKER_WWWROOT /local/moodleappbehat"
158162
159163# Initialize behat environment
160- bin/moodle-docker-compose exec webserver php admin/tool/behat/cli/init.php
164+ bin/moodle-docker-compose exec webserver php public/ admin/tool/behat/cli/init.php
161165# (you should see "Configured app tests for version X.X.X" here)
162166
163167# Run behat tests
164- bin/moodle-docker-compose exec -u www-data webserver php admin/tool/behat/cli/run.php --tags=" @app&&@mod_login"
168+ bin/moodle-docker-compose exec -u www-data webserver php public/ admin/tool/behat/cli/run.php --tags=" @app&&@mod_login"
165169Running single behat site:
166170Moodle 4.0dev (Build: 20200615), a2b286ce176fbe361f0889abc8f30f043cd664ae
167171Php: 7.2.30, pgsql: 11.8 (Debian 11.8-1.pgdg90+1), OS: Linux 5.3.0-61-generic x86_64
0 commit comments