Skip to content

Commit 038df02

Browse files
committed
Fix FileReadWriteStreamTest after reformatting html
1 parent a6a1fe5 commit 038df02

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

components/ByteStream/Tests/FileReadWriteStreamTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,24 @@ protected function tearDown(): void {
2222
public function testLongDistanceSeek() {
2323
$stream = FileReadWriteStream::from_path( __DIR__ . '/fixtures/pygmalion.html' );
2424

25-
$stream->seek( 242900 );
25+
$stream->seek( $stream->length() - 83 );
2626
$stream->pull( 83 );
2727
$last_bytes = $stream->consume( 83 );
28-
$expected_last_83_bytes = 'bscribe to our email newsletter to hear about new eBooks.
28+
$expected_last_83_bytes = 'subscribe to our email newsletter to hear about new eBooks.
2929
</div>
30-
</body>
30+
</body>
3131
</html>
3232
';
3333
$this->assertEquals( $expected_last_83_bytes, $last_bytes );
3434

3535
$stream->seek( 0 );
3636
$stream->pull( 83 );
3737
$first_bytes = $stream->consume( 83 );
38-
$expected_first_83_bytes = '
39-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
40-
"http://www.w3.org/TR/';
38+
$expected_first_83_bytes = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
39+
"http://www.w3.org/TR/xh';
4140
$this->assertEquals( $expected_first_83_bytes, $first_bytes );
4241

43-
$stream->seek( 242900 );
42+
$stream->seek( $stream->length() - 83 );
4443
$stream->pull( 40 );
4544
$last_bytes = $stream->consume( 40 );
4645

0 commit comments

Comments
 (0)