Passed
Pull Request — master (#407)
by Kirill
05:31
created

TestCase::uri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 1
1
<?php
2
3
/**
4
 * This file is part of Spiral Framework package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Tests\Distribution;
13
14
use GuzzleHttp\Psr7\Uri;
15
use PHPUnit\Framework\TestCase as BaseTestCase;
16
use Psr\Http\Message\UriInterface;
17
18
/**
19
 * @group unit
20
 */
21
abstract class TestCase extends BaseTestCase
22
{
23
    /**
24
     * @param string $uri
25
     * @return UriInterface
26
     */
27
    protected function uri(string $uri): UriInterface
28
    {
29
        return new Uri($uri);
30
    }
31
}
32