GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

WktTest::testDumpWithData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Geocoder package.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT License
11
 */
12
13
namespace Geocoder\Tests\Dumper;
14
15
use Geocoder\Dumper\Wkt;
16
use Geocoder\Model\Address;
17
use PHPUnit\Framework\TestCase;
18
19
/**
20
 * @author Jan Sorgalla <[email protected]>
21
 * @author William Durand <[email protected]>
22
 */
23
class WktTest extends TestCase
24
{
25
    /**
26
     * @var Wkt
27
     */
28
    private $dumper;
29
30
    public function setUp()
31
    {
32
        $this->dumper = new Wkt();
33
    }
34
35
    public function testDump()
36
    {
37
        $address = Address::createFromArray([]);
38
        $expected = sprintf('POINT(%F %F)', 0, 0);
39
        $result = $this->dumper->dump($address);
40
41
        $this->assertTrue(is_string($result));
42
        $this->assertEquals($expected, $result);
43
    }
44
45
    public function testDumpWithData()
46
    {
47
        $address = Address::createFromArray([
48
            'latitude' => 48.8631507,
49
            'longitude' => 2.3889114,
50
        ]);
51
        $expected = sprintf('POINT(%F %F)', 2.3889114, 48.8631507);
52
53
        $result = $this->dumper->dump($address);
54
55
        $this->assertTrue(is_string($result));
56
        $this->assertEquals($expected, $result);
57
    }
58
}
59