Skip to content

Commit 4043532

Browse files
committed
Expect null as content size
1 parent 66fd1d1 commit 4043532

8 files changed

+16
-16
lines changed

spec/Encoding/ChunkStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ function it_chunks_in_multiple()
4040
$this->getContents()->shouldReturn("6\r\nThis i\r\n6\r\ns a st\r\n4\r\nream\r\n0\r\n\r\n");
4141
}
4242

43-
function it_knows_the_content_size()
43+
function it_does_not_know_the_content_size()
4444
{
4545
$stream = new MemoryStream('This is a stream');
4646
$this->beConstructedWith($stream, 6);
4747

48-
$this->getSize()->shouldReturn(strlen("10\r\nThis is a stream\r\n0\r\n\r\n"));
48+
$this->getSize()->shouldReturn(null);
4949
}
5050
}

spec/Encoding/CompressStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ function it_gets_content()
4242
$this->getContents()->shouldReturn(gzcompress('This is a test stream'));
4343
}
4444

45-
function it_knows_the_content_size()
45+
function it_does_not_know_the_content_size()
4646
{
4747
$stream = new MemoryStream('This is a test stream');
4848
$this->beConstructedWith($stream);
4949

5050
$stream->rewind();
51-
$this->getSize()->shouldReturn(strlen(gzcompress('This is a test stream')));
51+
$this->getSize()->shouldReturn(null);
5252
}
5353
}

spec/Encoding/DechunkStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ function it_gets_content()
4141
$this->getContents()->shouldReturn('test');
4242
}
4343

44-
function it_knows_the_content_size()
44+
function it_does_not_know_the_content_size()
4545
{
4646
$stream = new MemoryStream("4\r\ntest\r\n4\r\ntest\r\n0\r\n\r\n\0");
4747
$this->beConstructedWith($stream);
4848

49-
$this->getSize()->shouldReturn(strlen('testtest'));
49+
$this->getSize()->shouldReturn(null);
5050
}
5151
}

spec/Encoding/DecompressStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ function it_gets_content()
4242
$this->getContents()->shouldReturn('This is a test stream');
4343
}
4444

45-
function it_knows_the_content_size()
45+
function it_does_not_know_the_content_size()
4646
{
4747
$stream = new MemoryStream(gzcompress('This is a test stream'));
4848
$this->beConstructedWith($stream);
4949

50-
$this->getSize()->shouldReturn(strlen('This is a test stream'));
50+
$this->getSize()->shouldReturn(null);
5151
}
5252
}

spec/Encoding/DeflateStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ function it_gets_content()
3737
$this->getContents()->shouldReturn(gzdeflate('This is a test stream'));
3838
}
3939

40-
function it_knows_the_content_size()
40+
function it_does_not_know_the_content_size()
4141
{
4242
$stream = new MemoryStream('This stream is a test stream');
4343
$this->beConstructedWith($stream);
4444

45-
$this->getSize()->shouldReturn(strlen(gzdeflate('This stream is a test stream')));
45+
$this->getSize()->shouldReturn(null);
4646
}
4747
}

spec/Encoding/GzipDecodeStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ function it_gets_content()
4242
$this->getContents()->shouldReturn('This is a test stream');
4343
}
4444

45-
function it_knows_the_content_size()
45+
function it_does_not_know_the_content_size()
4646
{
4747
$stream = new MemoryStream(gzencode('This is a test stream'));
4848
$this->beConstructedWith($stream);
4949

50-
$this->getSize()->shouldReturn(strlen('This is a test stream'));
50+
$this->getSize()->shouldReturn(null);
5151
}
5252
}

spec/Encoding/GzipEncodeStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ function it_gets_content()
4242
$this->getContents()->shouldReturn(gzencode('This is a test stream'));
4343
}
4444

45-
function it_knows_the_content_size()
45+
function it_does_not_know_the_content_size()
4646
{
4747
$stream = new MemoryStream('This is a test stream');
4848
$this->beConstructedWith($stream);
4949

5050
$stream->rewind();
51-
$this->getSize()->shouldReturn(strlen(gzencode('This is a test stream')));
51+
$this->getSize()->shouldReturn(null);
5252
}
5353
}

spec/Encoding/InflateStreamSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ function it_gets_content()
3737
$this->getContents()->shouldReturn('This is a test stream');
3838
}
3939

40-
function it_knows_the_content_size()
40+
function it_does_not_know_the_content_size()
4141
{
4242
$stream = new MemoryStream(gzdeflate('This stream is a test stream'));
4343
$this->beConstructedWith($stream);
4444

45-
$this->getSize()->shouldReturn(strlen('This stream is a test stream'));
45+
$this->getSize()->shouldReturn(null);
4646
}
4747
}

0 commit comments

Comments
 (0)