Skip to content

Commit dd8e636

Browse files
committed
Added test for empty address
1 parent d93de2d commit dd8e636

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Geocoder\Tests\Model;
4+
5+
use Geocoder\Model\Address;
6+
7+
class AddressTest extends \PHPUnit_Framework_TestCase
8+
{
9+
public function testDumpEmptyAddress()
10+
{
11+
$expected = array(
12+
'latitude' => NULL,
13+
'longitude' => NULL,
14+
'bounds' => array (
15+
'south' => NULL,
16+
'west' => NULL,
17+
'north' => NULL,
18+
'east' => NULL,
19+
),
20+
'streetNumber' => NULL,
21+
'streetName' => NULL,
22+
'postalCode' => NULL,
23+
'locality' => NULL,
24+
'subLocality' => NULL,
25+
'adminLevels' => array(),
26+
'country' => NULL,
27+
'countryCode' => NULL,
28+
'timezone' => NULL,
29+
);
30+
31+
$address = new Address();
32+
$this->assertEquals($address->toArray(), $expected);
33+
}
34+
}

0 commit comments

Comments
 (0)