public function __construct() { /** @var CurrencyExchange\Uri\UriGet */ $uri = UriFactory::factory(HttpRequest::HTTP_GET); $uri->setTemplateUri('http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency={%FROMCURRENCY%}&ToCurrency={%TOCURRENCY%}'); // Istantiates and initializes HttpClient and Uri objects parent::__construct($uri); }
public function __construct() { /** @var CurrencyExchange\Uri\UriGet */ $uri = UriFactory::factory(HttpRequest::HTTP_GET); $uri->setTemplateUri('http://download.finance.yahoo.com/d/quotes.csv?s={%FROMCURRENCY%}{%TOCURRENCY%}=X&f=sl1d1t1ba&e=.csv'); // Istantiates and initializes HttpClient and Uri objects parent::__construct($uri); }
public function __construct() { /** @var CurrencyExchange\Uri\UriGet */ $uri = UriFactory::factory(HttpRequest::HTTP_GET); $uri->setTemplateUri('http://currencies.apps.grandtrunk.net/getlatest/{%FROMCURRENCY%}/{%TOCURRENCY%}'); // Istantiates and initializes HttpClient and Uri objects parent::__construct($uri); }
/** * @dataProvider providerTestUriFactoryReturnsInstanceOfUriAbstract */ public function testUriFactoryReturnsInstanceOfUriAbstract($service) { $instance = UriFactory::factory($service); return $this->assertInstanceOf('\\CurrencyExchange\\Uri\\UriAbstract', $instance); }