Completed
Pull Request — master (#9)
by Harry
03:40
created

TestCase::getStream()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
/**
3
 * This file is part of graze/csv-token
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/csv-token/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/csv-token
12
 */
13
14
namespace Graze\CsvToken\Test;
15
16
class TestCase extends \PHPUnit_Framework_TestCase
17
{
18
    /**
19
     * @param string $string
20
     *
21
     * @return resource
22
     */
23
    protected function getStream($string)
24
    {
25
        $stream = fopen('php://memory', 'r+');
26
        fwrite($stream, $string);
27
        rewind($stream);
28
        return $stream;
29
    }
30
}
31