Switched continent_code to code

This commit is contained in:
Gregory Oschwald 2013-05-21 13:28:37 -07:00
parent 559e62a30c
commit 89f1bbdb65
5 changed files with 20 additions and 21 deletions

View File

@ -7,9 +7,8 @@ namespace GeoIP2\Record;
*
* This record is returned by all the end points.
*
* @property string $continentCode A two character continent code
* like "NA" (North America) or "OC" (Oceania). This attribute is returned
* by all end points.
* @property string $code A two character continent code like "NA" (North
* America) or "OC" (Oceania). This attribute is returned by all end points.
*
* @property int $geonameId The GeoName ID for the continent. This attribute
* is returned by all end points.
@ -27,7 +26,7 @@ class Continent extends AbstractPlaceRecord
* @ignore
*/
protected $validAttributes = array(
'continentCode',
'code',
'geonameId',
'names'
);

View File

@ -9,7 +9,7 @@ class CountryTest extends \PHPUnit_Framework_TestCase
private $raw = array(
'continent' => array(
'continent_code' => 'NA',
'code' => 'NA',
'geoname_id' => 42,
'names' => array( 'en' => 'North America' ),
),
@ -75,8 +75,8 @@ class CountryTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(
'NA',
$this->model->continent->continentCode,
'continent continent_code is NA'
$this->model->continent->code,
'continent code is NA'
);
$this->assertEquals(

View File

@ -8,7 +8,7 @@ class NameTest extends \PHPUnit_Framework_TestCase
{
public $raw = array(
'continent' => array(
'continent_code' => 'NA',
'code' => 'NA',
'geoname_id' => 42,
'names' => array(
'en' => 'North America',

View File

@ -17,7 +17,7 @@ class OmniTest extends \PHPUnit_Framework_TestCase
'names' => array( 'en' => 'Minneapolis' ),
),
'continent' => array(
'continent_code' => 'NA',
'code' => 'NA',
'geoname_id' => 42,
'names' => array( 'en' => 'North America' ),
),

View File

@ -13,7 +13,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
private $country
= array(
'continent' => array(
'continent_code' => 'NA',
'code' => 'NA',
'geoname_id' => 42,
'names' => array( 'en' => 'North America' ),
),
@ -100,8 +100,8 @@ class ClientTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(
'NA',
$country->continent->continentCode,
'continent continent_code is NA'
$country->continent->code,
'continent code is NA'
);
$this->assertEquals(