diff options
| author | Loic GUEGAN <loic@Manzerbredes.home> | 2016-04-16 19:10:27 +0200 |
|---|---|---|
| committer | Loic GUEGAN <loic@Manzerbredes.home> | 2016-04-16 19:10:27 +0200 |
| commit | a3ff4d243e2ac37d4516ae56ff86985eadc00eb8 (patch) | |
| tree | 32e71c42855cc46d95d9c6b74ad2c145eb9ec7eb /server/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php | |
| parent | 396c90f921c30de2d15d2ce52d5d1beabf8eb52d (diff) | |
| parent | 31d2d0c158ad4daa3dde7a905f3c2e312c194f2e (diff) | |
Test
Diffstat (limited to 'server/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php')
| -rwxr-xr-x | server/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/server/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php b/server/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php deleted file mode 100755 index 0e4b586..0000000 --- a/server/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -namespace GuzzleHttp\Tests\Psr7; - -use GuzzleHttp\Psr7; -use GuzzleHttp\Psr7\InflateStream; - -class InflateStreamtest extends \PHPUnit_Framework_TestCase -{ - public function testInflatesStreams() - { - $content = gzencode('test'); - $a = Psr7\stream_for($content); - $b = new InflateStream($a); - $this->assertEquals('test', (string) $b); - } - - public function testInflatesStreamsWithFilename() - { - $content = $this->getGzipStringWithFilename('test'); - $a = Psr7\stream_for($content); - $b = new InflateStream($a); - $this->assertEquals('test', (string) $b); - } - - private function getGzipStringWithFilename($original_string) - { - $gzipped = bin2hex(gzencode($original_string)); - - $header = substr($gzipped, 0, 20); - // set FNAME flag - $header[6]=0; - $header[7]=8; - // make a dummy filename - $filename = "64756d6d7900"; - $rest = substr($gzipped, 20); - - return hex2bin($header . $filename . $rest); - } -} |
