projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
renamed http\Message\Body::add() to ::addForm() because it acually adds form-data...
[m6w6/ext-http]
/
phpunit
/
MessageBodyTest.php
diff --git
a/phpunit/MessageBodyTest.php
b/phpunit/MessageBodyTest.php
index bc07401fa2526b9b3f0e731f96ccfbe5abf0959e..4ef4efe43814f7f2a9c0ed0018c1d5247b2b17ce 100644
(file)
--- a/
phpunit/MessageBodyTest.php
+++ b/
phpunit/MessageBodyTest.php
@@
-29,9
+29,9
@@
class MessageBodyTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(3, $this->temp->append("yes"));
}
$this->assertEquals(3, $this->temp->append("yes"));
}
- function testAdd() {
+ function testAdd
Form
() {
$this->assertTrue(
$this->assertTrue(
- $this->temp->add(
+ $this->temp->add
Form
(
array(
"foo" => "bar",
"more" => array(
array(
"foo" => "bar",
"more" => array(
@@
-67,7
+67,7
@@
class MessageBodyTest extends PHPUnit_Framework_TestCase {
"\r\n".
"fuz\r\n".
"--%x.%x\r\n".
"\r\n".
"fuz\r\n".
"--%x.%x\r\n".
- "Content-Disposition:
attachment
; name=\"upload\"; filename=\"MessageBodyTest.php\"\r\n".
+ "Content-Disposition:
form-data
; name=\"upload\"; filename=\"MessageBodyTest.php\"\r\n".
"Content-Transfer-Encoding: binary\r\n".
"Content-Type: text/plain\r\n".
"\r\n".
"Content-Transfer-Encoding: binary\r\n".
"Content-Type: text/plain\r\n".
"\r\n".
@@
-87,7
+87,7
@@
class MessageBodyTest extends PHPUnit_Framework_TestCase {
),
$this->file->etag()
);
),
$this->file->etag()
);
- $this->assertEquals(
md5
(""), $this->temp->etag());
+ $this->assertEquals(
crc32
(""), $this->temp->etag());
}
function testToStream() {
}
function testToStream() {
@@
-106,4
+106,8
@@
class MessageBodyTest extends PHPUnit_Framework_TestCase {
);
$this->assertEquals($s, (string) $this->file);
}
);
$this->assertEquals($s, (string) $this->file);
}
+
+ function testClone() {
+ $this->assertEquals((string) $this->file, (string) clone $this->file);
+ }
}
}