LocationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testBarcode() 0 20 1
1
<?php
2
3
namespace Passbook\Tests\Pass;
4
5
use Passbook\Pass\Location;
6
use PHPUnit\Framework\TestCase;
7
8
class LocationTest extends TestCase
9
{
10
    public function testBarcode()
11
    {
12
        $location = new Location(0, 0);
13
14
        $location
15
            ->setAltitude(100)
16
            ->setRelevantText('text')
17
        ;
18
19
        $this->assertEquals(0, $location->getLatitude());
20
        $this->assertEquals(0, $location->getLongitude());
21
22
        $expected = [
23
            'latitude' => 0,
24
            'longitude' => 0,
25
            'altitude' => 100,
26
            'relevantText' => 'text'
27
        ];
28
29
        $this->assertEquals($expected, $location->toArray());
30
    }
31
}
32