5
5
use Http \Message \MultipartStreamBuilder ;
6
6
use Zend \Diactoros \Stream ;
7
7
8
- class FunctionalTest extends \PHPUnit_Framework_TestCase
8
+ /**
9
+ * @author Tobias Nyholm <tobias.nyholm@gmail.com>
10
+ */
11
+ class FunctionTest extends \PHPUnit_Framework_TestCase
9
12
{
10
13
public function testSupportStreams ()
11
14
{
@@ -33,7 +36,7 @@ public function testSupportResources()
33
36
public function testHeaders ()
34
37
{
35
38
$ builder = new MultipartStreamBuilder ();
36
- $ builder ->addResource ('foobar ' , 'stream contents ' , ['headers ' => ['Content-Type ' => 'html/image ' , 'content-length ' => '4711 ' , 'CONTENT-DISPOSITION ' => 'none ' ]]);
39
+ $ builder ->addResource ('foobar ' , 'stream contents ' , ['headers ' => ['Content-Type ' => 'html/image ' , 'content-length ' => '4711 ' , 'CONTENT-DISPOSITION ' => 'none ' ]]);
37
40
38
41
$ multipartStream = (string ) $ builder ->build ();
39
42
$ this ->assertTrue (false !== strpos ($ multipartStream , 'Content-Type: html/image ' ));
@@ -72,7 +75,6 @@ public function testBoundary()
72
75
$ multipartStream = (string ) $ builder ->build ();
73
76
$ this ->assertEquals (2 , substr_count ($ multipartStream , $ boundary ));
74
77
75
-
76
78
$ builder ->addResource ('content1 ' , 'string ' );
77
79
$ builder ->addResource ('content2 ' , 'string ' );
78
80
$ builder ->addResource ('content3 ' , 'string ' );
@@ -82,7 +84,7 @@ public function testBoundary()
82
84
}
83
85
84
86
/**
85
- * @param $body
87
+ * @param string $body
86
88
*
87
89
* @return Stream
88
90
*/
@@ -94,4 +96,4 @@ private function createStream($body)
94
96
95
97
return $ stream ;
96
98
}
97
- }
99
+ }
0 commit comments