Mock test with phantomjs