gzip,deflate [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 DOCUMENT_ROOT] => /var/www/ [SCRIPT_FILENAME] => /var/www/tests/index.php */ $request = new phpbb_mock_request(array(), array(), array(), $server); $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array( $request, )); $symfony_request->expects($this->any()) ->method('getScriptName') ->will($this->returnValue($server['SCRIPT_NAME'])); $symfony_request->expects($this->any()) ->method('getQueryString') ->will($this->returnValue($server['QUERY_STRING'])); $symfony_request->expects($this->any()) ->method('getBasePath') ->will($this->returnValue($server['REQUEST_URI'])); $symfony_request->expects($this->any()) ->method('getPathInfo') ->will($this->returnValue('/')); $phpbb_filesystem = new \phpbb\filesystem($symfony_request, $phpbb_root_path, $phpEx); // Set no user and trick a bit to circumvent errors $user = new \phpbb\user(); $user->lang = true; $user->browser = $server['HTTP_USER_AGENT']; $user->referer = ''; $user->forwarded_for = ''; $user->host = $server['HTTP_HOST']; $user->page = \phpbb\session::extract_current_page($phpbb_root_path); } protected function tearDown() { global $user; $user = NULL; } }