LocationTest::testEmptyInstance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
4
namespace Fracture\Http\Headers;
5
6
use Exception;
7
use ReflectionClass;
8
use PHPUnit_Framework_TestCase;
9
10
class LocationTest extends PHPUnit_Framework_TestCase
11
{
12
13
    /**
14
     * @covers Fracture\Http\Headers\Location::__construct
15
     * @covers Fracture\Http\Headers\Location::prepare
16
     * @covers Fracture\Http\Headers\Location::getParsedData
17
     *
18
     * @covers Fracture\Http\Headers\Location::extractData
19
     */
20
    public function testEmptyInstance()
21
    {
22
        $instance = new Location('http://example.tld/path');
23
        $instance->prepare();
24
        $this->assertEquals([
25
            'scheme' => 'http',
26
            'host' => 'example.tld',
27
            'path' => '/path',
28
        ], $instance->getParsedData());
29
    }
30
}
31