InflateStreamTest.php 446 B

123456789101112131415161718192021
  1. <?php
  2. namespace RingCentral\Tests\Psr7;
  3. use RingCentral\Psr7;
  4. use RingCentral\Psr7\InflateStream;
  5. function php53_gzencode($data)
  6. {
  7. return gzdeflate($data);
  8. }
  9. class InflateStreamtest extends \PHPUnit_Framework_TestCase
  10. {
  11. public function testInflatesStreams()
  12. {
  13. $content = gzencode('test');
  14. $a = Psr7\stream_for($content);
  15. $b = new InflateStream($a);
  16. $this->assertEquals('test', (string) $b);
  17. }
  18. }