Completed
Push — master ( 8e987d...ff1c4b )
by Harry
04:10
created

TestCase::toStream()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
/**
3
 * This file is part of graze/gigya-client
4
 *
5
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/gigya-client/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/gigya-client
12
 */
13
14
namespace Graze\Gigya\Test;
15
16
use GuzzleHttp\Psr7\Stream;
17
18
class TestCase extends \PHPUnit_Framework_TestCase
19
{
20
    /**
21
     * @param string $text
22
     *
23
     * @return Stream
24
     */
25
    protected function toStream($text)
26
    {
27
        $stream = fopen('php://temp', 'a+');
28
        fwrite($stream, $text);
29
        rewind($stream);
30
        return new Stream($stream);
31
    }
32
}
33