Skip to content

Instantly share code, notes, and snippets.

@p

p/error Secret

Created November 18, 2012 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p/524bb925279c83458b5a to your computer and use it in GitHub Desktop.
Save p/524bb925279c83458b5a to your computer and use it in GitHub Desktop.
Configuration read from /var/www/qi/boards/functional/phpunit.xml.functional
...........IE..........
Time: 32 seconds, Memory: 41.00Mb
There was 1 error:
1) phpbb_functional_fileupload_form_test::test_valid_file
InvalidArgumentException: The current node list is empty.
/home/pie/apps/git-phpbb3-dependencies/Symfony/Component/DomCrawler/Crawler.php:467
/var/www/qi/boards/functional/tests/functional/fileupload_form_test.php:67
/home/pie/apps/git-phpunit-bundle/phpunit.php:44
FAILURES!
Tests: 23, Assertions: 48, Errors: 1, Incomplete: 1.
~pie/apps/git-phpbb-tools/run/test-functional 1.59s user 1.01s system 7% cpu 33.381 total
POST /boards/functional/phpBB/./posting.php?mode=reply&f=2&t=1&sid=36a24adf7203af6c0a525e454c1f5710 HTTP/1.1
Accept: */*
Accept-Encoding: deflate, gzip
Host: localqi
User-agent: Symfony2 BrowserKit
Referer: http://localqi/boards/functional/phpBB/./ucp.php?mode=login&sid=7cee26fa72e8a119aeaacb47d829a57d
Cookie: phpbb3_9rz7w_u=2; phpbb3_9rz7w_k=; phpbb3_9rz7w_sid=36a24adf7203af6c0a525e454c1f5710
Expect: 100-Continue
Content-Length: 870
Content-Type: multipart/form-data; boundary=----------------------------b9115531ce25
HTTP/1.1 100 Continue
------------------------------b9115531ce25
Content-Disposition: form-data; name="add_file"
Add the file
------------------------------b9115531ce25
Content-Disposition: form-data; name="fileupload"; filename="valid.jpg"
Content-Type: application/octet-stream
......JFIF.....H.H.....C....................................................................C.......................................................................2.2.............................................................................................................P..........G.....................P........?.G.....................P........?.G.....................P........?.G.....................P........?!G......................................................P........?.G.....................P........?.G.....................P........?.G..
------------------------------b9115531ce25--
HTTP/1.1 200 OK
Server: nginx/1.1.19
Date: Sun, 18 Nov 2012 19:25:17 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.3.10
Cache-Control: private, no-cache="set-cookie"
Expires: 0
Pragma: no-cache
f67
.<!DOCTYPE html>
<html dir="ltr" lang="en-gb">
<head>
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="" />
<title>yourdomain.com - Information</title>
.<link rel="alternate" type="application/atom+xml" title="Feed - yourdomain.com" href="http://localqi/boards/functional/phpBB/feed.php" />
.
.
.<link rel="alternate" type="application/atom+xml" title="Feed - New Topics" href="http://localqi/boards/functional/phpBB/feed.php?mode=topics" />
.
.
.
<!--
.phpBB style name: prosilver
.Based on style: prosilver (this is the default phpBB3 style)
.Original author: Tom Beddard ( http://www.subBlue.com/ )
.Modified by:
-->
<script type="text/javascript">
// <![CDATA[
.var jump_page = 'Enter the page number you wish to go to:';
.var on_page = '';
.var per_page = '';
.var base_url = '';
.var style_cookie = 'phpBBstyle';
.var style_cookie_settings = '; path=/';
.var onload_functions = new Array();
.var onunload_functions = new Array();
.
./**
.* Find a member
.*/
.function find_username(url)
.{
..popup(url, 760, 570, '_usersearch');
..return false;
.}
./**
.* New function for handling multiple calls to window9b0
s="icon-members"><a href="./memberlist.php" title="View complete list of members">Members</a></li>
.....
.....<li class="icon-logout"><a href="./ucp.php?mode=logout&amp;sid=36a24adf7203af6c0a525e454c1f5710" title="Logout [ admin ]" accesskey="x">Logout [ admin ]</a></li>
....
...</ul>
...</div>
..</div>
.</div>
.<a id="start_here"></a>
.<div id="page-body">
..
<div class="panel" id="message">
.<div class="inner">
.<h2>Information</h2>
.<p>The image file you tried to attach is invalid.</p>
.
.</div>
</div>
..</div>
<div id="page-footer">
.<div class="navbar">
..<div class="inner">
..<ul class="linklist">
...<li class="icon-home"><a href="./index.php" accesskey="h">Board index</a></li>
....
.....
.....
.....
.....
....
...<li class="rightside"><a href="./memberlist.php?mode=leaders">The team</a> &bull; <a href="./ucp.php?mode=delete_cookies" data-ajax="true" data-refresh="true">Delete all board cookies</a> &bull; All times are <abbr title="UTC">GMT+00:00</abbr></li>
..</ul>
..</div>
.</div>
.<div class="copyright">Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
..
..<br />Time : 0.442s | 8 Queries | GZIP : Off | Peak Memory Usage: 10.38 MiB | <a href="./posting.php?mode=reply&amp;f=2&amp;t=1&amp;explain=1">Explain</a>
..<br /><strong><a href="./adm/index.php?sid=36a24adf7203af6c0a525e454c1f5710">Administration Control Panel</a></strong>
.</div>
.<div id="darkenw0
private function upload_file($filename, $mimetype)
{
$file = array(
'tmp_name' => $this->path . $filename,
'name' => $filename,
'type' => $mimetype,
'size' => filesize($this->path . $filename),
'error' => UPLOAD_ERR_OK,
);
$crawler = $this->client->request(
'POST',
'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid,
array('add_file' => $this->lang('ADD_FILE')),
array('fileupload' => $file)
);
return $crawler;
}
Mime type however is set to octet-stream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment