Place both of the test files in your Moodle code root
Enable debug display and friends
Access testweb.php in your browser
Confirm no warnings were shown
Run testcli.php in your console ( php testcli.php )
Confirm no warnings were shown