/** * 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); }
/** * 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); }