public function testToStringNotReadable() { $handle = fopen(PSX_PATH_CACHE . '/StreamUtilTest.txt', 'w'); fwrite($handle, 'foobar'); $stream = new TempStream($handle); $this->assertFalse($stream->isReadable()); $this->assertEquals(6, $stream->tell()); $this->assertEquals('', Util::toString($stream)); $this->assertEquals(6, $stream->tell()); }
public function __construct($resource, $fileName, $contentType = null) { parent::__construct($resource); $this->fileName = $fileName; $this->contentType = $contentType; }
public function detach() { $this->contentLength = null; $this->chunkedEncoding = false; return parent::detach(); }