_currentWorkingDir = getcwd(); } /** * Handler for 'startTest' event * * @param \PHPUnit_Framework_TestCase $test * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function endTest(\PHPUnit_Framework_TestCase $test) { if (getcwd() != $this->_currentWorkingDir) { chdir($this->_currentWorkingDir); } } }