Part 1
Run unit tests and make sure they are all passing.
Part 2
To test, you need at least one badge issued from Moodle, and your web site to be accessible online (because we are testing hosted assertions).
1. From my badges page go to your issued badge. URL should be in form of badges/badge.php?hash=XXXXXXXXXXX
2. Manually change URL to look like badges/assertion.php?b=XXXXXXXXX where XXXXXXXXX is the issued badge unique hash. If you changed it correctly, you should see a JSON string that starts with '{"uid":"XXXXXXXXX"'...
3. Copy either this entire JSON string or just assertion URL. It works both ways.
4. Go to http://validator.openbadges.org
5. Paste what you copied into a textarea and click "Check Validity".
6. After validation is done, you should see a message "Valid", "Spec Version: 1.0.0" similar to attached image 