File: StreamTest.php

package info (click to toggle)
php-http-psr7-integration-tests 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 452 kB
  • sloc: php: 1,593; makefile: 19
file content (19 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

namespace Http\Psr7Test\Tests\Laminas;

use Http\Psr7Test\StreamIntegrationTest;
use Laminas\Diactoros\Stream;
use Psr\Http\Message\StreamInterface;

class StreamTest extends StreamIntegrationTest
{
    public function createStream($data)
    {
        if ($data instanceof StreamInterface) {
            return $data;
        }

        return new Stream($data);
    }
}