Add tests

phantomjs seems to dislike the `setToken` method