File: InflateStreamTest.php

package info (click to toggle)
icinga-php-thirdparty 0.14.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 83,296 kB
  • sloc: xml: 606,631; php: 387,147; javascript: 29,395; sql: 121; makefile: 67; sh: 6
file content (21 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
namespace RingCentral\Tests\Psr7;

use RingCentral\Psr7;
use RingCentral\Psr7\InflateStream;

function php53_gzencode($data)
{
    return gzdeflate($data);
}

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);
    }
}