Passed
Pull Request — master (#103)
by Razvan
15:39 queued 12:47
created

LocationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 24
rs 10
c 0
b 0
f 0
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
}