Completed
Push — master ( 17598f...abee1f )
by Kirill
13s queued 11s
created

RequestFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 7
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreateRequest() 0 5 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Tests\Framework\Http;
13
14
use PHPUnit\Framework\TestCase;
15
use Spiral\Http\Diactoros\ServerRequestFactory;
16
17
class RequestFactoryTest extends TestCase
18
{
19
    public function testCreateRequest(): void
20
    {
21
        $r = (new ServerRequestFactory())->createServerRequest('GET', '/home');
22
        $this->assertSame('GET', $r->getMethod());
23
        $this->assertSame('/home', $r->getUri()->getPath());
24
    }
25
}
26