Skip to content

Commit

Permalink
Merge pull request #3 from PomeloProductions/master
Browse files Browse the repository at this point in the history
updated for laravel 6 and phpunit 8
  • Loading branch information
radicalloop authored Jan 2, 2020
2 parents 8f31d7f + f4fa323 commit 5e99ca2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.phpunit.result.cache
vendor
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
}
],
"require": {
"illuminate/support": "^5.1",
"illuminate/contracts": "^5.1",
"guzzlehttp/guzzle": "^6.3"
"guzzlehttp/guzzle": "^6.3",
"illuminate/support": "^6.0",
"illuminate/contracts": "^6.0"
},
"autoload": {
"psr-4": {
"RadicalLoop\\Eod\\": "src/"
}
},
"require-dev": {
"phpunit/phpunit": "^6.0",
"phpunit/phpunit": "^8.0",
"mikey179/vfsStream": "^1.6"
},
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ConfigTest extends TestCase
{
protected $config;

protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->config = new Config('apitoken');
Expand Down
2 changes: 1 addition & 1 deletion tests/EodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class EodTest extends TestCase
{
protected $client;

protected function setUp()
protected function setUp(): void
{
parent::setUp();
$apiToken = 'apitoken';
Expand Down
9 changes: 5 additions & 4 deletions tests/ExchangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ExchangeTest extends TestCase
protected $exchange; //comment
private $root;

protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->root = vfsStream::setup('storage');
Expand All @@ -30,16 +30,17 @@ public function exchange_symbol()
$content = $this->exchange->symbol('US')->json();
$data = json_decode($content, true);

$this->assertInternalType('array', $data);
$this->assertTrue(is_array($data));
$this->assertNotEmpty($data);

$this->assertCount(5, $data[0]);
$this->assertCount(6, $data[0]);

$this->assertArrayHasKey('Code', $data[0]);
$this->assertArrayHasKey('Name', $data[0]);
$this->assertArrayHasKey('Country', $data[0]);
$this->assertArrayHasKey('Exchange', $data[0]);
$this->assertArrayHasKey('Currency', $data[0]);
$this->assertArrayHasKey('Type', $data[0]);
}

/** @test **/
Expand All @@ -48,7 +49,7 @@ public function multiple_ticker()
$content = $this->exchange->multipleTicker('US')->json();
$data = json_decode($content, true);

$this->assertInternalType('array', $data);
$this->assertTrue(is_array($data));
$this->assertNotEmpty($data);

$this->assertCount(9, $data[0]);
Expand Down
2 changes: 1 addition & 1 deletion tests/StockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class StockTest extends TestCase
{
protected $stock;

protected function setUp()
protected function setUp(): void
{
parent::setUp();
$apiToken = getenv('API_TOKEN');
Expand Down

0 comments on commit 5e99ca2

Please sign in to comment.