Skip to content

Commit b019e1d

Browse files
committed
Removed unneeded test/method for GzStreamGuzzle that I had added.
1 parent e9ba138 commit b019e1d

2 files changed

Lines changed: 0 additions & 41 deletions

File tree

src/GzStreamGuzzle.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -210,25 +210,4 @@ public function writeFooterEarly()
210210
$this->stream->write(pack("V", $this->writeSize));
211211
$this->footerLen = 8;
212212
}
213-
214-
// Not working as I hoped:
215-
public function undoWriteFooter()
216-
{
217-
if ($this->footerLen > 0) {
218-
// Attempt to remove the footer content already written by moving to the start of the footer position:
219-
$this->seek(($this->headerLen + $this->writeSize) - 1);
220-
221-
// Restore Hash Context:
222-
$this->hashCtx = $this->hashCtxBeforeFooter;
223-
224-
// Add the filter back in:
225-
$resource = StreamWrapper::getResource($this->stream);
226-
$params = array('level' => $this->level);
227-
$this->filter = stream_filter_append($resource, 'zlib.deflate', STREAM_FILTER_WRITE, $params);
228-
$this->stream = new Stream($resource);
229-
230-
// Reset the Footer Length:
231-
$this->footerLen = 0;
232-
}
233-
}
234213
}

tests/StringTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -165,24 +165,4 @@ public function testWriteFileAndReadStream()
165165
$this->log(__METHOD__, false);
166166
$this->memoryUsage(__METHOD__, 'Finish');
167167
}
168-
169-
/*public function testWriteAfterReadOnlyStream()
170-
{
171-
$compressedString = new String();
172-
173-
$content = 'The quick brown fox jumps over the lazy dog';
174-
$compressedString->write($content);
175-
//$compressedString->writeCompressedContents('write_after_readonly_1.gz');
176-
177-
$compressedString->getGzStream()->seek(0);
178-
$compressedString->getGzStream()->undoWriteFooter();
179-
180-
$textToAppend = 'APPENDED';
181-
$compressedString->write($textToAppend);
182-
183-
$compressedString->writeCompressedContents('write_after_readonly_2.gz');
184-
$this->assertEquals($content.$textToAppend, $compressedString->getDecompressedContents());
185-
186-
//$compressedString->writeDecompressedContents('write_after_readonly.txt');
187-
}*/
188168
}

0 commit comments

Comments
 (0)