Switched continent_code to code
This commit is contained in:
parent
559e62a30c
commit
89f1bbdb65
|
@ -7,9 +7,8 @@ namespace GeoIP2\Record;
|
||||||
*
|
*
|
||||||
* This record is returned by all the end points.
|
* This record is returned by all the end points.
|
||||||
*
|
*
|
||||||
* @property string $continentCode A two character continent code
|
* @property string $code A two character continent code like "NA" (North
|
||||||
* like "NA" (North America) or "OC" (Oceania). This attribute is returned
|
* America) or "OC" (Oceania). This attribute is returned by all end points.
|
||||||
* by all end points.
|
|
||||||
*
|
*
|
||||||
* @property int $geonameId The GeoName ID for the continent. This attribute
|
* @property int $geonameId The GeoName ID for the continent. This attribute
|
||||||
* is returned by all end points.
|
* is returned by all end points.
|
||||||
|
@ -27,7 +26,7 @@ class Continent extends AbstractPlaceRecord
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
protected $validAttributes = array(
|
protected $validAttributes = array(
|
||||||
'continentCode',
|
'code',
|
||||||
'geonameId',
|
'geonameId',
|
||||||
'names'
|
'names'
|
||||||
);
|
);
|
||||||
|
|
|
@ -9,9 +9,9 @@ class CountryTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
private $raw = array(
|
private $raw = array(
|
||||||
'continent' => array(
|
'continent' => array(
|
||||||
'continent_code' => 'NA',
|
'code' => 'NA',
|
||||||
'geoname_id' => 42,
|
'geoname_id' => 42,
|
||||||
'names' => array( 'en' => 'North America' ),
|
'names' => array( 'en' => 'North America' ),
|
||||||
),
|
),
|
||||||
'country' => array(
|
'country' => array(
|
||||||
'geoname_id' => 1,
|
'geoname_id' => 1,
|
||||||
|
@ -75,8 +75,8 @@ class CountryTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'NA',
|
'NA',
|
||||||
$this->model->continent->continentCode,
|
$this->model->continent->code,
|
||||||
'continent continent_code is NA'
|
'continent code is NA'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
|
|
|
@ -8,9 +8,9 @@ class NameTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public $raw = array(
|
public $raw = array(
|
||||||
'continent' => array(
|
'continent' => array(
|
||||||
'continent_code' => 'NA',
|
'code' => 'NA',
|
||||||
'geoname_id' => 42,
|
'geoname_id' => 42,
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'en' => 'North America',
|
'en' => 'North America',
|
||||||
'zh-CN' => '北美洲',
|
'zh-CN' => '北美洲',
|
||||||
),
|
),
|
||||||
|
|
|
@ -17,9 +17,9 @@ class OmniTest extends \PHPUnit_Framework_TestCase
|
||||||
'names' => array( 'en' => 'Minneapolis' ),
|
'names' => array( 'en' => 'Minneapolis' ),
|
||||||
),
|
),
|
||||||
'continent' => array(
|
'continent' => array(
|
||||||
'continent_code' => 'NA',
|
'code' => 'NA',
|
||||||
'geoname_id' => 42,
|
'geoname_id' => 42,
|
||||||
'names' => array( 'en' => 'North America' ),
|
'names' => array( 'en' => 'North America' ),
|
||||||
),
|
),
|
||||||
'country' => array(
|
'country' => array(
|
||||||
'confidence' => 99,
|
'confidence' => 99,
|
||||||
|
@ -181,7 +181,7 @@ class OmniTest extends \PHPUnit_Framework_TestCase
|
||||||
$model->representedCountry,
|
$model->representedCountry,
|
||||||
'$model->representedCountry'
|
'$model->representedCountry'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertCount(
|
$this->assertCount(
|
||||||
0,
|
0,
|
||||||
$model->subdivisions,
|
$model->subdivisions,
|
||||||
|
|
|
@ -13,9 +13,9 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
||||||
private $country
|
private $country
|
||||||
= array(
|
= array(
|
||||||
'continent' => array(
|
'continent' => array(
|
||||||
'continent_code' => 'NA',
|
'code' => 'NA',
|
||||||
'geoname_id' => 42,
|
'geoname_id' => 42,
|
||||||
'names' => array( 'en' => 'North America' ),
|
'names' => array( 'en' => 'North America' ),
|
||||||
),
|
),
|
||||||
'country' => array(
|
'country' => array(
|
||||||
'geoname_id' => 1,
|
'geoname_id' => 1,
|
||||||
|
@ -100,8 +100,8 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'NA',
|
'NA',
|
||||||
$country->continent->continentCode,
|
$country->continent->code,
|
||||||
'continent continent_code is NA'
|
'continent code is NA'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user