Skip to content

Commit

Permalink
Update dependencies and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
otherguy committed Dec 3, 2020
1 parent 95953f1 commit 4fff31d
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 40 deletions.
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":3296:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:53:{s:34:"DriverFactoryTest::can_init_driver";d:0.007;s:63:"DriverFactoryTest::will_throw_exception_if_using_invalid_driver";d:0.001;s:42:"DriverFactoryTest::can_get_list_of_drivers";d:0;s:57:"BaseCurrencyDriverTest::init_will_properly_set_parameters";d:0.002;s:53:"BaseCurrencyDriverTest::will_properly_switch_to_https";d:0;s:47:"BaseCurrencyDriverTest::from_sets_base_currency";d:0.001;s:47:"BaseCurrencyDriverTest::to_sets_target_currency";d:0;s:42:"BaseCurrencyDriverTest::setters_are_fluent";d:0;s:49:"BaseCurrencyDriverTest::can_set_and_retrieve_date";d:0;s:48:"BaseCurrencyDriverTest::can_perform_api_requests";d:0.003;s:39:"CurrencyLayerTest::can_get_latest_rates";d:0;s:43:"CurrencyLayerTest::can_get_historical_rates";d:0;s:64:"CurrencyLayerTest::fails_to_get_historical_rates_if_date_not_set";d:0;s:47:"CurrencyLayerTest::can_convert_currency_amounts";d:0;s:47:"CurrencyLayerTest::can_handle_response_failures";d:0;s:42:"ExchangeRatesApiTest::fails_to_set_api_key";d:0;s:42:"ExchangeRatesApiTest::can_get_latest_rates";d:0;s:46:"ExchangeRatesApiTest::can_get_historical_rates";d:0;s:67:"ExchangeRatesApiTest::fails_to_get_historical_rates_if_date_not_set";d:0;s:55:"ExchangeRatesApiTest::fails_to_convert_currency_amounts";d:0;s:50:"ExchangeRatesApiTest::can_handle_response_failures";d:0;s:33:"FixerIoTest::can_get_latest_rates";d:0;s:37:"FixerIoTest::can_get_historical_rates";d:0;s:58:"FixerIoTest::fails_to_get_historical_rates_if_date_not_set";d:0;s:41:"FixerIoTest::can_convert_currency_amounts";d:0;s:41:"FixerIoTest::can_handle_response_failures";d:0;s:44:"MockCurrencyDriverTest::can_get_latest_rates";d:0;s:48:"MockCurrencyDriverTest::can_get_historical_rates";d:0;s:46:"MockCurrencyDriverTest::can_convert_currencies";d:0;s:37:"OpenExchangeRatesTest::can_set_app_id";d:0;s:43:"OpenExchangeRatesTest::can_get_latest_rates";d:0.002;s:47:"OpenExchangeRatesTest::can_get_historical_rates";d:0.002;s:68:"OpenExchangeRatesTest::fails_to_get_historical_rates_if_date_not_set";d:0.001;s:51:"OpenExchangeRatesTest::can_convert_currency_amounts";d:0.001;s:51:"OpenExchangeRatesTest::can_handle_response_failures";d:0.001;s:32:"DateHelperTest::can_parse_a_date";d:0.001;s:33:"DateHelperTest::can_format_a_date";d:0.001;s:33:"DateHelperTest::can_create_a_date";d:0.001;s:45:"DateHelperTest::can_get_current_date_and_time";d:0.001;s:36:"DateHelperTest::can_get_current_date";d:0.001;s:60:"ConversionResultTest::construct_will_properly_set_parameters";d:0;s:50:"ConversionResultTest::returns_all_conversion_rates";d:0;s:72:"ConversionResultTest::fails_to_convert_if_target_currency_does_not_exist";d:0;s:72:"ConversionResultTest::fails_to_convert_if_source_currency_does_not_exist";d:0;s:52:"ConversionResultTest::can_convert_between_currencies";d:0;s:71:"ConversionResultTest::fails_to_retrieve_rate_if_currency_does_not_exist";d:0;s:56:"ConversionResultTest::retrieves_currency_conversion_rate";d:0;s:78:"ConversionResultTest::fails_to_change_base_currency_if_currency_does_not_exist";d:0;s:45:"ConversionResultTest::can_reset_base_currency";d:0;s:46:"ConversionResultTest::can_change_base_currency";d:0;s:31:"SymbolTest::can_get_all_symbols";d:0;s:33:"SymbolTest::can_get_a_symbol_name";d:0;s:41:"SymbolTest::can_get_a_list_of_all_symbols";d:0;}}}
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: php

php:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
Expand All @@ -15,7 +13,7 @@ env:

install:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev --no-interaction
- php composer.phar install --no-interaction
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _If you want to see more services added, feel free to [open an issue](https://gi

## Prerequisites 📚

* `PHP 7.1` or higher (Tested on: PHP `7.1` ✅, `7.2` ✅, `7.3` ✅ and `7.4` ✅)
* `PHP 7.3` or higher (Tested on: PHP ✅, `7.3` ✅ and `7.4` ✅)
* The [`composer`](https://getcomposer.org) dependency manager for PHP
* An account with one or more of the [API providers](#supported-apis-) listed above

Expand Down
52 changes: 23 additions & 29 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory>./src</directory>
<exclude>
<directory>./vendor</directory>
<directory>./tests</directory>
<directory>./examples</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-text" target="php://stdout"/>
<log type="coverage-clover" target="build/cov.xml"/>
<log type="junit" target="build/junit.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory>./src</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./tests</directory>
<directory>./examples</directory>
</exclude>
<report>
<clover outputFile="build/cov.xml"/>
<text outputFile="php://stdout"/>
</report>
</coverage>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/junit.xml"/>
</logging>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Drivers/BaseCurrencyDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BaseCurrencyDriverTest extends TestCase

private $valid_json_response = '{ "success": true, "base": "USD", "date": "2019-06-11", "rates": { "JPY": 107.346001, "EUR": 0.813399 } }';

protected function setUp()
protected function setUp(): void
{
$mock = new MockHandler([
new Response(200, [], $this->valid_json_response),
Expand Down
2 changes: 1 addition & 1 deletion tests/Drivers/CurrencyLayerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CurrencyLayerTest extends TestCase

private $mockHandler;

protected function setUp()
protected function setUp(): void
{
$this->mockHandler = new MockHandler();
$this->currencyLayer = DriverFactory::make('currencylayer', new Client(['handler' => $this->mockHandler]));
Expand Down
2 changes: 1 addition & 1 deletion tests/Drivers/ExchangeRatesApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ExchangeRatesApiTest extends TestCase

private $mockHandler;

protected function setUp()
protected function setUp(): void
{
$this->mockHandler = new MockHandler();
$this->exchangeRatesApi = DriverFactory::make('exchangeratesapi', new Client(['handler' => $this->mockHandler]));
Expand Down
2 changes: 1 addition & 1 deletion tests/Drivers/FixerIoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FixerIoTest extends TestCase

private $mockHandler;

protected function setUp()
protected function setUp(): void
{
$this->mockHandler = new MockHandler();
$this->fixerIo = DriverFactory::make('fixerio', new Client(['handler' => $this->mockHandler]));
Expand Down
2 changes: 1 addition & 1 deletion tests/Drivers/MockCurrencyDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MockCurrencyDriverTest extends TestCase
/** @var BaseCurrencyDriver */
private $mockCurrencyDriver;

protected function setUp()
protected function setUp(): void
{
$this->mockCurrencyDriver = DriverFactory::make('mock');
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Drivers/OpenExchangeRatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class OpenExchangeRatesTest extends TestCase

private $mockHandler;

protected function setUp()
protected function setUp(): void
{
$this->mockHandler = new MockHandler();
$this->openExchangeRates = DriverFactory::make('openexchangerates', new Client(['handler' => $this->mockHandler]));
Expand Down
2 changes: 1 addition & 1 deletion tests/Results/ConversionResultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ConversionResultTest extends TestCase
/**
*
*/
protected function setUp()
protected function setUp(): void
{
$this->classUnderTest = new ConversionResult(Symbol::USD, 1560293762, [
'EUR' => 0.88,
Expand Down

0 comments on commit 4fff31d

Please sign in to comment.