public function requireBootstrap($file) { if (!$file) { return; } if (!file_exists($file)) { $message = sprintf('Bootstrap specified but could not be found (%s)', $file); throw new \RuntimeException($message); } $this->scopedRequire($file); }
public function testRequireBootstrapIsChdirResistent() { $file = dirname(__FILE__) . '/../../../../fixtures/chdirBootstrap.php'; $tester = new PHPUnit(); $cwd = getcwd(); $tester->requireBootstrap($file); $this->assertEquals($cwd, getcwd()); }