diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/composer.json b/composer.json old mode 100755 new mode 100644 diff --git a/phpunit.xml.dist b/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/tests/Tests/Exception/ChainExceptionTest.php b/tests/Tests/Exception/ChainExceptionTest.php index 4bdac4a..6bdc182 100644 --- a/tests/Tests/Exception/ChainExceptionTest.php +++ b/tests/Tests/Exception/ChainExceptionTest.php @@ -36,7 +36,7 @@ class ChainExceptionTest extends TestCase */ private $exception2; - public function setUp(): void + protected function setUp(): void { $this->exception1 = new \Exception('Something bad happened.'); $this->exception2 = new \Exception('General exception.'); diff --git a/tests/Tests/Integration/ExchangerTest.php b/tests/Tests/Integration/ExchangerTest.php index 9ec3762..d74c99c 100644 --- a/tests/Tests/Integration/ExchangerTest.php +++ b/tests/Tests/Integration/ExchangerTest.php @@ -27,7 +27,7 @@ class ExchangerTest extends TestCase { private $fixerAccessKey; - public function setUp(): void + protected function setUp(): void { $this->fixerAccessKey = getenv('FIXER_ACCESS_KEY'); } @@ -65,8 +65,8 @@ private function cacheTest(callable $provideQuery) $thirdEnd = microtime(true) - $thirdStart; $this->assertEquals($firstRate, $secondRate, $thirdRate); - $this->assertTrue($secondEnd < (100 * $firstEnd)); - $this->assertTrue($thirdEnd < (100 * $firstEnd)); + $this->assertLessThan(100 * $firstEnd, $secondEnd); + $this->assertLessThan(100 * $firstEnd, $thirdEnd); } /** diff --git a/tests/Tests/Service/CurrencyDataFeedTest.php b/tests/Tests/Service/CurrencyDataFeedTest.php index fe17105..a70f54b 100644 --- a/tests/Tests/Service/CurrencyDataFeedTest.php +++ b/tests/Tests/Service/CurrencyDataFeedTest.php @@ -58,7 +58,7 @@ public function it_fetches_a_rate() $rate = $service->getExchangeRate(new ExchangeRateQuery($pair)); $this->assertSame(1.18765, $rate->getValue()); - $this->assertTrue('2017-12-21' == $rate->getDate()->format('Y-m-d')); + $this->assertEquals('2017-12-21', $rate->getDate()->format('Y-m-d')); $this->assertEquals('currency_data_feed', $rate->getProviderName()); $this->assertSame($pair, $rate->getCurrencyPair()); } diff --git a/tests/Tests/Service/ForgeTest.php b/tests/Tests/Service/ForgeTest.php index 3743395..ce055b9 100644 --- a/tests/Tests/Service/ForgeTest.php +++ b/tests/Tests/Service/ForgeTest.php @@ -58,7 +58,7 @@ public function it_fetches_a_rate() $rate = $service->getExchangeRate(new ExchangeRateQuery($pair)); $this->assertSame(1.18711, $rate->getValue()); - $this->assertTrue('2017-12-21' == $rate->getDate()->format('Y-m-d')); + $this->assertEquals('2017-12-21', $rate->getDate()->format('Y-m-d')); $this->assertEquals('forge', $rate->getProviderName()); $this->assertSame($pair, $rate->getCurrencyPair()); } @@ -75,7 +75,7 @@ public function it_fetches_a_rate_when_response_symbol_matches() $rate = $service->getExchangeRate(new ExchangeRateQuery($pair)); $this->assertSame(9.12721, $rate->getValue()); - $this->assertTrue('2018-05-30' == $rate->getDate()->format('Y-m-d')); + $this->assertEquals('2018-05-30', $rate->getDate()->format('Y-m-d')); $this->assertEquals('forge', $rate->getProviderName()); $this->assertSame($pair, $rate->getCurrencyPair()); }