Remove use of promises in mock

PhantomJS does not support promises, so I had to fake them.