‪TYPO3CMS  10.4
StreamTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
22 
28 class ‪StreamTest extends UnitTestCase
29 {
33  protected ‪$stream;
34 
35  protected function ‪setUp(): void
36  {
37  parent::setUp();
38  $this->stream = new ‪Stream('php://memory', 'wb+');
39  }
40 
45  {
46  self::assertInstanceOf(Stream::class, $this->stream);
47  }
48 
52  public function ‪canInstantiateWithStreamResource()
53  {
54  $resource = fopen('php://memory', 'wb+');
55  ‪$stream = new Stream($resource);
56  self::assertInstanceOf(Stream::class, ‪$stream);
57  }
58 
63  {
64  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
65  touch($fileName);
66  $this->testFilesToDelete[] = $fileName;
67  ‪$stream = new Stream($fileName, 'w');
68  self::assertFalse(‪$stream->‪isReadable());
69  }
70 
75  {
76  ‪$stream = new Stream('php://memory', 'r');
77  self::assertFalse(‪$stream->‪isWritable());
78  }
79 
84  {
85  $message = 'foo bar';
86  $this->stream->write($message);
87  self::assertEquals($message, (string)$this->stream);
88  }
89 
93  public function ‪detachReturnsResource()
94  {
95  $resource = fopen('php://memory', 'wb+');
96  ‪$stream = new Stream($resource);
97  self::assertSame($resource, ‪$stream->‪detach());
98  }
99 
104  {
105  $this->expectException(\InvalidArgumentException::class);
106  new Stream([' THIS WILL NOT WORK ']);
107  }
108 
113  {
114  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
115  touch($fileName);
116  $this->testFilesToDelete[] = $fileName;
117  file_put_contents($fileName, 'FOO BAR');
118  ‪$stream = new Stream($fileName, 'w');
119 
120  self::assertEquals('', ‪$stream->‪__toString());
121  }
122 
126  public function ‪closeClosesResource()
127  {
128  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
129  touch($fileName);
130  $this->testFilesToDelete[] = $fileName;
131  $resource = fopen($fileName, 'wb+');
132  ‪$stream = new Stream($resource);
133  ‪$stream->‪close();
134  self::assertFalse(is_resource($resource));
135  }
136 
140  public function ‪closeUnsetsResource()
141  {
142  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
143  touch($fileName);
144  $this->testFilesToDelete[] = $fileName;
145  $resource = fopen($fileName, 'wb+');
146  ‪$stream = new Stream($resource);
147  ‪$stream->‪close();
148 
149  self::assertNull(‪$stream->‪detach());
150  }
151 
155  public function ‪closeDoesNothingAfterDetach()
156  {
157  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
158  touch($fileName);
159  $this->testFilesToDelete[] = $fileName;
160  $resource = fopen($fileName, 'wb+');
161  ‪$stream = new Stream($resource);
162  $detached = ‪$stream->‪detach();
163 
164  ‪$stream->‪close();
165  self::assertTrue(is_resource($detached));
166  self::assertSame($resource, $detached);
167  }
168 
173  {
174  $this->stream->detach();
175  self::assertNull($this->stream->getSize());
176  }
177 
182  {
183  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
184  $this->testFilesToDelete[] = $fileName;
185  file_put_contents($fileName, 'FOO BAR');
186  $resource = fopen($fileName, 'wb+');
187  ‪$stream = new Stream($resource);
188 
189  fseek($resource, 2);
190 
191  self::assertEquals(2, ‪$stream->‪tell());
192  }
193 
198  {
199  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
200  $this->testFilesToDelete[] = $fileName;
201  file_put_contents($fileName, 'FOO BAR');
202  $resource = fopen($fileName, 'wb+');
203  ‪$stream = new Stream($resource);
204 
205  fseek($resource, 2);
207  $this->expectException(\RuntimeException::class);
208  $this->expectExceptionCode(1436717285);
209  ‪$stream->‪tell();
210  }
211 
216  {
217  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
218  $this->testFilesToDelete[] = $fileName;
219  file_put_contents($fileName, 'FOO BAR');
220  $resource = fopen($fileName, 'wb+');
221  ‪$stream = new Stream($resource);
222 
223  fseek($resource, 2);
224  self::assertFalse(‪$stream->‪eof());
225  }
226 
230  public function ‪eofReportsTrueWhenAtEndOfStream()
231  {
232  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
233  $this->testFilesToDelete[] = $fileName;
234  file_put_contents($fileName, 'FOO BAR');
235  $resource = fopen($fileName, 'wb+');
236  ‪$stream = new Stream($resource);
237 
238  while (!feof($resource)) {
239  fread($resource, 4096);
240  }
241  self::assertTrue(‪$stream->‪eof());
242  }
243 
247  public function ‪eofReportsTrueWhenStreamIsDetached()
248  {
249  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
250  $this->testFilesToDelete[] = $fileName;
251  file_put_contents($fileName, 'FOO BAR');
252  $resource = fopen($fileName, 'wb+');
253  ‪$stream = new Stream($resource);
254 
255  fseek($resource, 2);
257  self::assertTrue(‪$stream->‪eof());
258  }
259 
264  {
265  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
266  $this->testFilesToDelete[] = $fileName;
267  file_put_contents($fileName, 'FOO BAR');
268  $resource = fopen($fileName, 'wb+');
269  ‪$stream = new Stream($resource);
270  self::assertTrue(‪$stream->‪isSeekable());
271  }
272 
277  {
278  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
279  $this->testFilesToDelete[] = $fileName;
280  file_put_contents($fileName, 'FOO BAR');
281  $resource = fopen($fileName, 'wb+');
282  ‪$stream = new Stream($resource);
284  self::assertFalse(‪$stream->‪isSeekable());
285  }
286 
290  public function ‪seekAdvancesToGivenOffsetOfStream()
291  {
292  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
293  $this->testFilesToDelete[] = $fileName;
294  file_put_contents($fileName, 'FOO BAR');
295  $resource = fopen($fileName, 'wb+');
296  ‪$stream = new Stream($resource);
297  ‪$stream->‪seek(2);
298  self::assertEquals(2, ‪$stream->‪tell());
299  }
300 
304  public function ‪rewindResetsToStartOfStream()
305  {
306  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
307  $this->testFilesToDelete[] = $fileName;
308  file_put_contents($fileName, 'FOO BAR');
309  $resource = fopen($fileName, 'wb+');
310  ‪$stream = new Stream($resource);
311  ‪$stream->‪seek(2);
313  self::assertEquals(0, ‪$stream->‪tell());
314  }
315 
320  {
321  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
322  $this->testFilesToDelete[] = $fileName;
323  file_put_contents($fileName, 'FOO BAR');
324  $resource = fopen($fileName, 'wb+');
325  ‪$stream = new Stream($resource);
327  $this->expectException(\RuntimeException::class);
328  $this->expectExceptionCode(1436717287);
329  ‪$stream->‪seek(2);
330  }
331 
336  {
337  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
338  $this->testFilesToDelete[] = $fileName;
339  file_put_contents($fileName, 'FOO BAR');
340  $resource = fopen($fileName, 'wb+');
341  ‪$stream = new Stream($resource);
343  self::assertFalse(‪$stream->‪isWritable());
344  }
345 
350  {
351  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
352  $this->testFilesToDelete[] = $fileName;
353  file_put_contents($fileName, 'FOO BAR');
354  $resource = fopen($fileName, 'wb+');
355  ‪$stream = new Stream($resource);
357  $this->expectException(\RuntimeException::class);
358  $this->expectExceptionCode(1436717290);
359  ‪$stream->‪write('bar');
360  }
361 
366  {
367  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
368  $this->testFilesToDelete[] = $fileName;
369  file_put_contents($fileName, 'FOO BAR');
370  $resource = fopen($fileName, 'wb+');
371  ‪$stream = new Stream($resource);
373  self::assertFalse(‪$stream->‪isReadable());
374  }
375 
380  {
381  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
382  $this->testFilesToDelete[] = $fileName;
383  file_put_contents($fileName, 'FOO BAR');
384  $resource = fopen($fileName, 'r');
385  ‪$stream = new Stream($resource);
387  $this->expectException(\RuntimeException::class);
388  $this->expectExceptionCode(1436717292);
389  ‪$stream->‪read(4096);
390  }
391 
396  {
397  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
398  $this->testFilesToDelete[] = $fileName;
399  file_put_contents($fileName, 'FOO BAR');
400  $resource = fopen($fileName, 'r');
401  ‪$stream = new Stream($resource);
402  while (!feof($resource)) {
403  fread($resource, 4096);
404  }
405  self::assertEquals('', ‪$stream->‪read(4096));
406  }
407 
412  {
413  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
414  $this->testFilesToDelete[] = $fileName;
415  file_put_contents($fileName, 'FOO BAR');
416  $resource = fopen($fileName, 'w');
417  ‪$stream = new Stream($resource);
418  self::assertEquals('', ‪$stream->‪getContents());
419  }
420 
424  public function ‪invalidResourcesDataProvider()
425  {
426  $fileName = tempnam(sys_get_temp_dir(), 'PHLY');
427  $this->testFilesToDelete[] = $fileName;
428 
429  return [
430  'null' => [null],
431  'false' => [false],
432  'true' => [true],
433  'int' => [1],
434  'float' => [1.1],
435  'array' => [[fopen($fileName, 'r+')]],
436  'object' => [(object)['resource' => fopen($fileName, 'r+')]],
437  ];
438  }
439 
445  {
446  $this->expectException(\InvalidArgumentException::class);
447  $this->expectExceptionCode(1436717297);
448  $this->stream->attach($resource);
449  }
450 
455  {
456  $this->expectException(\InvalidArgumentException::class);
457  $this->expectExceptionCode(1436717296);
458  $this->stream->attach('foo-bar-baz');
459  }
460 
464  public function ‪attachWithResourceAttachesResource()
465  {
466  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
467  touch($fileName);
468  $this->testFilesToDelete[] = $fileName;
469  $resource = fopen($fileName, 'r+');
470  $this->stream->attach($resource);
471 
472  $r = new \ReflectionProperty($this->stream, 'resource');
473  $r->setAccessible(true);
474  $test = $r->getValue($this->stream);
475  self::assertSame($resource, $test);
476  }
477 
482  {
483  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
484  touch($fileName);
485  $this->testFilesToDelete[] = $fileName;
486  $this->stream->attach($fileName);
487 
488  $resource = fopen($fileName, 'r+');
489  fwrite($resource, 'FooBar');
490 
491  $this->stream->rewind();
492  $test = (string)$this->stream;
493  self::assertEquals('FooBar', $test);
494  }
495 
500  {
501  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
502  touch($fileName);
503  $this->testFilesToDelete[] = $fileName;
504  $resource = fopen($fileName, 'r+');
505  $this->stream->attach($resource);
506 
507  fwrite($resource, 'FooBar');
508 
509  // rewind, because current pointer is at end of stream!
510  $this->stream->rewind();
511  $test = $this->stream->getContents();
512  self::assertEquals('FooBar', $test);
513  }
514 
519  {
520  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
521  touch($fileName);
522  $this->testFilesToDelete[] = $fileName;
523  $resource = fopen($fileName, 'r+');
524  $this->stream->attach($resource);
525 
526  fwrite($resource, 'FooBar');
527 
528  // seek to position 3
529  $this->stream->seek(3);
530  $test = $this->stream->getContents();
531  self::assertEquals('Bar', $test);
532  }
533 
538  {
539  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
540  touch($fileName);
541  $this->testFilesToDelete[] = $fileName;
542  $resource = fopen($fileName, 'r+');
543  $this->stream->attach($resource);
544 
545  $expected = stream_get_meta_data($resource);
546  $test = $this->stream->getMetadata();
547 
548  self::assertEquals($expected, $test);
549  }
550 
555  {
556  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
557  touch($fileName);
558  $this->testFilesToDelete[] = $fileName;
559  $resource = fopen($fileName, 'r+');
560  $this->stream->attach($resource);
561 
562  $metadata = stream_get_meta_data($resource);
563  $expected = $metadata['uri'];
564 
565  $test = $this->stream->getMetadata('uri');
566 
567  self::assertEquals($expected, $test);
568  }
569 
574  {
575  $fileName = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_');
576  touch($fileName);
577  $this->testFilesToDelete[] = $fileName;
578  $resource = fopen($fileName, 'r+');
579  $this->stream->attach($resource);
580 
581  self::assertNull($this->stream->getMetadata('TOTALLY_MADE_UP'));
582  }
583 
587  public function ‪getSizeReturnsStreamSize()
588  {
589  $resource = fopen(__FILE__, 'r');
590  $expected = fstat($resource);
591  ‪$stream = new Stream($resource);
592  self::assertEquals($expected['size'], ‪$stream->‪getSize());
593  }
594 }
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\closeUnsetsResource
‪closeUnsetsResource()
Definition: StreamTest.php:139
‪TYPO3\CMS\Core\Http\Stream\rewind
‪rewind()
Definition: Stream.php:208
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\attachWithStringRepresentingResourceCreatesAndAttachesResource
‪attachWithStringRepresentingResourceCreatesAndAttachesResource()
Definition: StreamTest.php:480
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\invalidResourcesDataProvider
‪array invalidResourcesDataProvider()
Definition: StreamTest.php:423
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\readRaisesExceptionWhenStreamIsDetached
‪readRaisesExceptionWhenStreamIsDetached()
Definition: StreamTest.php:378
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\tellReportsCurrentPositionInResource
‪tellReportsCurrentPositionInResource()
Definition: StreamTest.php:180
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getContentsReturnsEmptyStringIfStreamIsNotReadable
‪getContentsReturnsEmptyStringIfStreamIsNotReadable()
Definition: StreamTest.php:410
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\attachWithResourceAttachesResource
‪attachWithResourceAttachesResource()
Definition: StreamTest.php:463
‪TYPO3\CMS\Core\Tests\Unit\Http
Definition: ApplicationTypeTest.php:16
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isSeekableReturnsFalseForDetachedStreams
‪isSeekableReturnsFalseForDetachedStreams()
Definition: StreamTest.php:275
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\writeRaisesExceptionWhenStreamIsDetached
‪writeRaisesExceptionWhenStreamIsDetached()
Definition: StreamTest.php:348
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\attachWithNonStringNonResourceRaisesExceptionByType
‪attachWithNonStringNonResourceRaisesExceptionByType($resource)
Definition: StreamTest.php:443
‪TYPO3\CMS\Core\Http\Stream\seek
‪seek($offset, $whence=SEEK_SET)
Definition: Stream.php:183
‪TYPO3\CMS\Core\Http\Stream\tell
‪int tell()
Definition: Stream.php:131
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\closeClosesResource
‪closeClosesResource()
Definition: StreamTest.php:125
‪TYPO3\CMS\Core\Http\Stream\read
‪string read($length)
Definition: Stream.php:270
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isWritableReturnsFalseIfStreamIsNotWritable
‪isWritableReturnsFalseIfStreamIsNotWritable()
Definition: StreamTest.php:73
‪TYPO3\CMS\Core\Http\Stream\eof
‪bool eof()
Definition: Stream.php:148
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getMetadataReturnsAllMetadataWhenNoKeyPresent
‪getMetadataReturnsAllMetadataWhenNoKeyPresent()
Definition: StreamTest.php:536
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getContentsShouldReturnStreamContentsFromCurrentPointer
‪getContentsShouldReturnStreamContentsFromCurrentPointer()
Definition: StreamTest.php:517
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\toStringSerializationReturnsEmptyStringWhenStreamIsNotReadable
‪toStringSerializationReturnsEmptyStringWhenStreamIsNotReadable()
Definition: StreamTest.php:111
‪TYPO3\CMS\Core\Http\Stream\isSeekable
‪bool isSeekable()
Definition: Stream.php:161
‪TYPO3\CMS\Core\Http\Stream\write
‪int write($string)
Definition: Stream.php:234
‪TYPO3\CMS\Core\Http\Stream\isReadable
‪bool isReadable()
Definition: Stream.php:251
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\eofReportsFalseWhenNotAtEndOfStream
‪eofReportsFalseWhenNotAtEndOfStream()
Definition: StreamTest.php:214
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\constructorRaisesExceptionWhenPassingInvalidStreamResource
‪constructorRaisesExceptionWhenPassingInvalidStreamResource()
Definition: StreamTest.php:102
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\canInstantiateWithStreamResource
‪canInstantiateWithStreamResource()
Definition: StreamTest.php:51
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getSizeReturnsStreamSize
‪getSizeReturnsStreamSize()
Definition: StreamTest.php:586
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getMetadataReturnsNullIfNoDataExistsForKey
‪getMetadataReturnsNullIfNoDataExistsForKey()
Definition: StreamTest.php:572
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isReadableReturnsFalseWhenStreamIsDetached
‪isReadableReturnsFalseWhenStreamIsDetached()
Definition: StreamTest.php:364
‪TYPO3\CMS\Core\Http\Stream
Definition: Stream.php:29
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\$stream
‪Stream $stream
Definition: StreamTest.php:32
‪TYPO3\CMS\Core\Http\Stream\__toString
‪string __toString()
Definition: Stream.php:72
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\rewindResetsToStartOfStream
‪rewindResetsToStartOfStream()
Definition: StreamTest.php:303
‪TYPO3\CMS\Core\Http\Stream\getContents
‪string getContents()
Definition: Stream.php:292
‪TYPO3\CMS\Core\Http\Stream\getSize
‪int null getSize()
Definition: Stream.php:116
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\eofReportsTrueWhenAtEndOfStream
‪eofReportsTrueWhenAtEndOfStream()
Definition: StreamTest.php:229
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\seekAdvancesToGivenOffsetOfStream
‪seekAdvancesToGivenOffsetOfStream()
Definition: StreamTest.php:289
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\toStringRetrievesFullContentsOfStream
‪toStringRetrievesFullContentsOfStream()
Definition: StreamTest.php:82
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\setUp
‪setUp()
Definition: StreamTest.php:34
‪TYPO3\CMS\Core\Http\Stream\close
‪close()
Definition: Stream.php:88
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪TYPO3\CMS\Core\Http\Stream\detach
‪resource null detach()
Definition: Stream.php:104
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isWritableReturnsFalseWhenStreamIsDetached
‪isWritableReturnsFalseWhenStreamIsDetached()
Definition: StreamTest.php:334
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\attachWithNonStringNonResourceRaisesExceptionByString
‪attachWithNonStringNonResourceRaisesExceptionByString()
Definition: StreamTest.php:453
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getContentsShouldGetFullStreamContents
‪getContentsShouldGetFullStreamContents()
Definition: StreamTest.php:498
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isReadableReturnsFalseIfStreamIsNotReadable
‪isReadableReturnsFalseIfStreamIsNotReadable()
Definition: StreamTest.php:61
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\tellRaisesExceptionIfResourceIsDetached
‪tellRaisesExceptionIfResourceIsDetached()
Definition: StreamTest.php:196
‪TYPO3\CMS\Core\Http\Stream\isWritable
‪bool isWritable()
Definition: Stream.php:218
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\eofReportsTrueWhenStreamIsDetached
‪eofReportsTrueWhenStreamIsDetached()
Definition: StreamTest.php:246
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getMetadataReturnsDataForSpecifiedKey
‪getMetadataReturnsDataForSpecifiedKey()
Definition: StreamTest.php:553
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\readReturnsEmptyStringWhenAtEndOfFile
‪readReturnsEmptyStringWhenAtEndOfFile()
Definition: StreamTest.php:394
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\closeDoesNothingAfterDetach
‪closeDoesNothingAfterDetach()
Definition: StreamTest.php:154
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest
Definition: StreamTest.php:29
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\seekRaisesExceptionWhenStreamIsDetached
‪seekRaisesExceptionWhenStreamIsDetached()
Definition: StreamTest.php:318
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isSeekableReturnsTrueForReadableStreams
‪isSeekableReturnsTrueForReadableStreams()
Definition: StreamTest.php:262
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getSizeReportsNullWhenNoResourcePresent
‪getSizeReportsNullWhenNoResourcePresent()
Definition: StreamTest.php:171
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\canInstantiateWithStreamIdentifier
‪canInstantiateWithStreamIdentifier()
Definition: StreamTest.php:43
‪TYPO3\CMS\Core\Core\Environment\getVarPath
‪static string getVarPath()
Definition: Environment.php:192
‪TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\detachReturnsResource
‪detachReturnsResource()
Definition: StreamTest.php:92