21 $this->_object = new \Magento\TestFramework\Isolation\WorkingDirectory();
26 $this->_object =
null;
31 $oldWorkingDir = getcwd();
33 if ($oldWorkingDir == $newWorkingDir) {
34 $this->markTestSkipped(
"Test requires the current working directory to differ from '{$oldWorkingDir}'.");
36 $this->_object->startTest($this);
37 chdir($newWorkingDir);
38 $this->assertEquals($newWorkingDir, getcwd(),
'Unable to change the current working directory.');
39 $this->_object->endTest($this);
40 $this->assertEquals($oldWorkingDir, getcwd(),
'Current working directory was not restored.');
defined('TESTS_BP')||define('TESTS_BP' __DIR__