tests for close method
fixing tests in phantomjs