/** * Tests the lookup function with just a postcode * * @depejnds testParseResponse */ public function testLookup() { $apiKey = getenv('GETADDRESSKEY'); if (!$apiKey) { $this->markTestIncomplete('No api key has been set, so unable to test against getaddress.io'); return; } $client = new \petelawrence\getaddress\GetAddressClient($apiKey); $result = $client->lookup('NR10 4JJ'); $this->checkResultObject($result); }
/** * Tests the lookup function with an invalid apiKey * * @expectedException \petelawrence\getaddress\GetAddressAuthenticationException */ public function testLookupWithInvalidApikey() { $client = new \petelawrence\getaddress\GetAddressClient('fooo'); $client->lookup('NR10 4JJ'); }