Completed
Pull Request — master (#232)
by Alejandro
05:16
created

VisitLocationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A valuesFoundWhenExchangingArrayAreCastToString() 0 13 1
1
<?php
2
declare(strict_types=1);
3
4
namespace ShlinkioTest\Shlink\Core\Entity;
5
6
use PHPUnit\Framework\TestCase;
7
use Shlinkio\Shlink\Core\Entity\VisitLocation;
8
9
class VisitLocationTest extends TestCase
10
{
11
    /**
12
     * @test
13
     */
14
    public function valuesFoundWhenExchangingArrayAreCastToString()
15
    {
16
        $payload = [
17
            'latitude' => 1000.7,
18
            'longitude' => -2000.4,
19
        ];
20
21
        $location = new VisitLocation();
22
        $location->exchangeArray($payload);
23
24
        $this->assertSame('1000.7', $location->getLatitude());
25
        $this->assertSame('-2000.4', $location->getLongitude());
26
    }
27
}
28