Skip to content

Commit c6a789f

Browse files
committed
Remove FnStream tests.
1 parent a540e15 commit c6a789f

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

tests/RequestTest.php

+1-15
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ public function testFalseyBody()
5454
$this->assertSame('0', (string)$r->getBody());
5555
}
5656

57-
public function testConstructorDoesNotReadStreamBody()
58-
{
59-
$streamIsRead = false;
60-
$body = Http\FnStream::decorate(Http\stream_for(''), [
61-
'__toString' => function () use (&$streamIsRead) {
62-
$streamIsRead = true;
63-
return '';
64-
}
65-
]);
66-
$r = new Request('GET', '/', [], $body);
67-
$this->assertFalse($streamIsRead);
68-
$this->assertSame($body, $r->getBody());
69-
}
70-
7157
public function testCapitalizesMethod()
7258
{
7359
$r = new Request('get', '/');
@@ -182,4 +168,4 @@ public function testAddsPortToHeaderAndReplacePreviousPort()
182168
$r = $r->withUri(new Uri('http://foo.com:8125/bar'));
183169
$this->assertEquals('foo.com:8125', $r->getHeaderLine('host'));
184170
}
185-
}
171+
}

tests/ResponseTest.php

+1-16
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@ public function testCanConstructWithStatusCode()
3434
$this->assertSame('Not Found', $r->getReasonPhrase());
3535
}
3636

37-
public function testConstructorDoesNotReadStreamBody()
38-
{
39-
$streamIsRead = false;
40-
$body = Http\FnStream::decorate(Http\stream_for(''), [
41-
'__toString' => function () use (&$streamIsRead) {
42-
$streamIsRead = true;
43-
return '';
44-
}
45-
]);
46-
47-
$r = new Response(200, [], $body);
48-
$this->assertFalse($streamIsRead);
49-
$this->assertSame($body, $r->getBody());
50-
}
51-
5237
public function testStatusCanBeNumericString()
5338
{
5439
$r = new Response('404');
@@ -252,4 +237,4 @@ public function testHeaderValuesAreTrimmed()
252237
$this->assertSame(['Foo'], $r->getHeader('OWS'));
253238
}
254239
}
255-
}
240+
}

0 commit comments

Comments
 (0)