示例#1
0
 /**
  * Test city field value.
  */
 public function testGetSpecificField()
 {
     $ipinfo = new Ipinfo();
     $expected = "Mountain View";
     $actual = $ipinfo->getSpecificField("8.8.8.8", Ipinfo::CITY);
     $this->assertEquals($expected, $actual);
 }
示例#2
0
 /**
  * Test in debug mode.
  */
 public function testDebugMode()
 {
     $ipinfo = new Ipinfo(array('debug' => true));
     $expected = 'Mountain View';
     $actual = $ipinfo->getSpecificField('8.8.8.8', Ipinfo::CITY);
     $this->assertEquals($expected, $actual);
 }