forked from reactphp/http
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFactoryTest.php
More file actions
26 lines (22 loc) · 751 Bytes
/
FactoryTest.php
File metadata and controls
26 lines (22 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
namespace React\Tests\Http\StreamingBodyParser;
use React\Http\StreamingBodyParser\Factory;
use React\Http\Request;
use React\Tests\Http\TestCase;
class FactoryTest extends TestCase
{
public function testContentLength()
{
$request = new Request('POST', 'http://example.com/', [], 1.1, [
'content-length' => 123,
]);
$parser = Factory::create($request);
$this->assertInstanceOf('React\Http\StreamingBodyParser\RawBodyParser', $parser);
}
public function testNoHeaders()
{
$request = new Request('POST', 'http://example.com/');
$parser = Factory::create($request);
$this->assertInstanceOf('React\Http\StreamingBodyParser\RawBodyParser', $parser);
}
}