Fixed test

Fixed a typo in the test which prevented phantomjs from reading it
correctly.  Changed test to use an instance hook rather than a global
hook.