Using mock objects in tests
Merge remote-tracking branch 'origin/master'

Conflicts:
	tests/library/Rapid/DbTest.php
Fix loader and test