I'm using PHPUnit for a set of functional tests. A remote database is accessed during these tests. The database is only accessible through an SSH tunnel. So I manually start a tunnel in a separate terminal each time I run these tests.
Is there an elegant way to start an SSH tunnel during PHPUnit setup and then close the tunnel at teardown?