LocationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testEmptyInstance() 0 10 1
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