Fix typo.
Adding some more unit tests.
Rename stub files to stub extension to not confuse IDEs. Fixes #1158.
Fix PHP 5.4 syntax in test.