Passed
Push — maintenance-work ( b6a05d...a58b3b )
by Razvan
12:47
created

LocationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 22
rs 10
c 0
b 0
f 0
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
}