You can run the tests by running ./vendor/bin/phpunit in your terminal from inside the plugin directory. To change the tests, take a look in the tests directory of the plugin, you'll find that it's structured very similarly to the src/transformer directory. You should also notice that each test is made up of 4 files:
- The
test.phpfile is used to run the test and specifies the directory containing the files listed below. - The
data.jsonfile is used to mock the Moodle database for the test. - The
event.jsonfile is used to mock the logstore event for the test. - The
statements.jsonfile is the expected output of the transformer during the test.