Close connection in test cases to

This should allow phpunit tests to run cleanly without running out of connections.