File tree 1 file changed +6
-7
lines changed
components/ByteStream/Tests
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -22,25 +22,24 @@ protected function tearDown(): void {
22
22
public function testLongDistanceSeek () {
23
23
$ stream = FileReadWriteStream::from_path ( __DIR__ . '/fixtures/pygmalion.html ' );
24
24
25
- $ stream ->seek ( 242900 );
25
+ $ stream ->seek ( $ stream -> length () - 83 );
26
26
$ stream ->pull ( 83 );
27
27
$ 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.
29
29
</div>
30
- </body>
30
+ </body>
31
31
</html>
32
32
' ;
33
33
$ this ->assertEquals ( $ expected_last_83_bytes , $ last_bytes );
34
34
35
35
$ stream ->seek ( 0 );
36
36
$ stream ->pull ( 83 );
37
37
$ 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 ' ;
41
40
$ this ->assertEquals ( $ expected_first_83_bytes , $ first_bytes );
42
41
43
- $ stream ->seek ( 242900 );
42
+ $ stream ->seek ( $ stream -> length () - 83 );
44
43
$ stream ->pull ( 40 );
45
44
$ last_bytes = $ stream ->consume ( 40 );
46
45
You can’t perform that action at this time.
0 commit comments